LSL-PyOptimizer/unit_tests/expr.suite
Sei Lisa ec509b3840 Fix parenthesization of unary minus
The algorithm for adding parentheses around unary operators was not working properly. It converted a * (-b) * c into a * -b * c, which LSL handles as a * -(b * c).

Fix and add test cases for that. One of the test cases shows an example where the difference matters: 0 * (-1e20) * 1e20 should result in 0.0, but if wrongly parenthesized, it gives NaN, because 1e20*1e20 gives infinity due to float overflow, and minus infinity times 0 is indeterminate.

The addition of parentheses has been improved, but it still does not eliminate every redundant parenthesis.

Also fix the horrendous typo of using "operands" where it should be "operators".
2019-05-04 23:20:20 +02:00
..
basic.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
basic.out Add the new test suite. 2019-01-04 20:27:36 +01:00
casts.lsl Add a test case to the infinity vector conversion 2019-01-15 23:18:10 +01:00
casts.out Add a test case to the infinity vector conversion 2019-01-15 23:18:10 +01:00
experience-emsg.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
experience-emsg.out Add the new test suite. 2019-01-04 20:27:36 +01:00
i-to-b64-to-i.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
i-to-b64-to-i.out Add the new test suite. 2019-01-04 20:27:36 +01:00
list-extraction.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
list-extraction.out Add the new test suite. 2019-01-04 20:27:36 +01:00
list-funcs-1.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
list-funcs-1.out Add the new test suite. 2019-01-04 20:27:36 +01:00
list-funcs-2.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
list-funcs-2.out Add the new test suite. 2019-01-04 20:27:36 +01:00
list-funcs-3.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
list-funcs-3.out Add the new test suite. 2019-01-04 20:27:36 +01:00
lldeletesublist-empty.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
lldeletesublist-empty.out Add the new test suite. 2019-01-04 20:27:36 +01:00
llescapeurl.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
llescapeurl.out Add the new test suite. 2019-01-04 20:27:36 +01:00
llescapeurl.run Add the new test suite. 2019-01-04 20:27:36 +01:00
llfrand-1.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
llfrand-1.out Add the new test suite. 2019-01-04 20:27:36 +01:00
llfrand-2.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
llfrand-2.out Add the new test suite. 2019-01-04 20:27:36 +01:00
llgeneratekey.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
llgeneratekey.out Add the new test suite. 2019-01-04 20:27:36 +01:00
lllistfindlist.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
lllistfindlist.out Add the new test suite. 2019-01-04 20:27:36 +01:00
llliststatistics.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
llliststatistics.out Add the new test suite. 2019-01-04 20:27:36 +01:00
lllog.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
lllog.out Add the new test suite. 2019-01-04 20:27:36 +01:00
llmodpow.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
llmodpow.out Add the new test suite. 2019-01-04 20:27:36 +01:00
llpow.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
llpow.out Add the new test suite. 2019-01-04 20:27:36 +01:00
llunescapeurl.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
llunescapeurl.out Add the new test suite. 2019-01-04 20:27:36 +01:00
llunescapeurl.run Add the new test suite. 2019-01-04 20:27:36 +01:00
math-error.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
math-error.out Add the new test suite. 2019-01-04 20:27:36 +01:00
math-funcs.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
math-funcs.out Add the new test suite. 2019-01-04 20:27:36 +01:00
misc-functions.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
misc-functions.out Add the new test suite. 2019-01-04 20:27:36 +01:00
nan-fcast-vcast-minus0.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
nan-fcast-vcast-minus0.out Add the new test suite. 2019-01-04 20:27:36 +01:00
operators-compare.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
operators-compare.out Add the new test suite. 2019-01-04 20:27:36 +01:00
operators.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
operators.out Add the new test suite. 2019-01-04 20:27:36 +01:00
opts.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
opts.out Fix parenthesization of unary minus 2019-05-04 23:20:20 +02:00
opts.run Add the new test suite. 2019-01-04 20:27:36 +01:00
quat-funcs.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
quat-funcs.out Add the new test suite. 2019-01-04 20:27:36 +01:00
s-to-b64-to-s.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
s-to-b64-to-s.out Add the new test suite. 2019-01-04 20:27:36 +01:00
s-to-b64-to-s.run Add the new test suite. 2019-01-04 20:27:36 +01:00
sort.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
sort.out Add the new test suite. 2019-01-04 20:27:36 +01:00
string-funcs.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
string-funcs.out Add the new test suite. 2019-01-04 20:27:36 +01:00
trig.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
trig.out Add the new test suite. 2019-01-04 20:27:36 +01:00
unicode.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
unicode.out Add the new test suite. 2019-01-04 20:27:36 +01:00
xorb64.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
xorb64.out Add the new test suite. 2019-01-04 20:27:36 +01:00
xorb64sc.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
xorb64sc.out Add the new test suite. 2019-01-04 20:27:36 +01:00
xorb64str.lsl Add the new test suite. 2019-01-04 20:27:36 +01:00
xorb64str.out Add the new test suite. 2019-01-04 20:27:36 +01:00