Re: Phix value() function
- Posted by petelomax in January
- 582 views
Try to_number() or to_integer()
There are also some subtle inaccuracies inherent with conversion to human-readable decimal and back.
Some numbers deserve printing to 3 or 4 more digits than you might first think, and some (can't remember
which but 0.3 probably isn't one) where you might assume "0.300000000000000001" is more accurate but
it turns out that "0.3" is actually better. While [de]serialise() are somewhat more opaque, they are much
safer (for squirting over the internet as hex-encoded bytes) and both shorter/faster and more accurate
than get/value().
Those warnings have been there quite a while, and nothing has yet suffered that fate/threat. They seem to
do their job of making people consider alternatives, and not rely on them too heavily or expect miracles.