quote:
Originally posted by Choli
quote:
Originally posted by CookieRevised
Seems like single precision doesn't yield the accurate result, double precision does.
4.1 is a periodic number in base 2, it doesn't matter if you choose single or double precission
That page I linked to does tell/show it makes a big difference though (also the docs I've read on it -quickly- say it does) :/ ....
---------------------
EDIT:
- Requested thread to be moved to public scripting forum.
- For those who whish to check versions, use something like this to avoid the floating point trap and to have an as accurate as possible build check:
code:
function _isValidVersion(nSoftwareBuild) {
return parseInt(MsgPlus.Version) * 1000 + MsgPlus.VersionBuild >= nSoftwareBuild
}
Where
nSoftwareBuild is a number in the form of 4244, 4250, 5398, etc...
This is the exact same method used by Plus! itself to check for updates and stuff. And since the major version number and build number will always uniquely define the installed version (the minor version number doesn't matter).
The function will return
true if the user's version is equal or higher than the requested
softwarebuild.