Page MenuHome

Fix T77300: Some Scientific Notation Evalutation Has Incorrect Results
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Jun 3 2020, 7:11 PM.

Details

Summary

This is a very simple fix. After we see another operation character that means we're no longer in
scientific notation we have to consider it as a position for ")" rather than continue.

The only reason I made a patch for this is somewhat unrelated. With P1411 and a seed of 3216 the
expressions still fail in some situations because the reach the max length of the string.

Specifically
(0.2-2_2)- 2e+2+(0.2+2_2)*0.2e+2_2+(0.2-2_2)*(0.2-2_2)*(0.2+2_2)* 2e+2+ 2- 0.2e+2* 0.2e+2+ (0.2-2_2)-(0.2e+2_2)-(0.2+2_2)+ (0.2-2_2)-(0.2e+2_2)- (0.2e+2_2)+ 2e+2- (0.2e-2_2)- 2e-2*0.2e+2-(0.2-2_2)-0.2e+2_2-(0.2-2_2)m
can still fail because there is no room left to replace "m" so it gets passed to python, leading
to a ValueError. This is fine as far as I'm concerned, no sane person is going to be entering that.
But I just wanted to check.

Diff Detail

Repository
rB Blender
Branch
fix-scientific-notation-evaluation (branched from master)
Build Status
Buildable 8359
Build 8359: arc lint + arc unit