LSL-PyOptimizer/unit_tests/expr.suite/issue-17.lsl
Sei Lisa 281ff4d96a Strings representing denormals no longer give 0 when cast to float
This annoyance and discrepancy with LSO was finally fixed by Linden Lab. The change has prompted some modifications to the test suite to accommodate for the new results. A further improvement has been to make these tests more friendly to be run in SL, making it easier to verify the results.

Fixes #17.

Reported by SaladDais@users.noreply.github.com - thanks!
2022-05-17 13:48:05 +02:00

12 lines
504 B
Text

// Test cases based on bug report by SaladDais@users.noreply.github.com;
// see https://github.com/Sei-Lisa/LSL-PyOptimizer/issues/17
// The first two cases are a change of behaviour in Mono, which used to return
// zero when a string that represented a denormal was converted to float (LSO
// did not have this problem).
// The last two cases are a screwup on the author's side.
[ (string)((float)"-0.0")
, (string)(1.4e-45 == (float)"1.4e-45")
, (string)0.00000000000001
, (string)-0.00000000000001
]