|more useful options|
Re: Let's try for a better CPAN experienceby syphilis (Bishop)
|on Jun 02, 2021 at 07:42 UTC||Need Help??|
Be careful when testing floating point numbers
Indeed, that's good advice.
However,if your dealing only with nvtypes of 'double' or '__float128', there's pretty much only ever one correct result - so if you find a discrepancy across different systems with either of those 2 nvtypes, then you've almost certainly exposed a bug.
It gets a lot murkier with the 'long double' nvtype as there's a number of different kinds of 'long double' - and this is further complicated by the fact that some of those implementations are rather questionable (if not outright buggy) to begin with.
For example, I've encountered long double builds of perl where sqrt(2) != 2 ** 0.5