JSage icon indicating copy to clipboard operation
JSage copied to clipboard

jsage preparsing of float literally ending in 0's omits 0's

Open williamstein opened this issue 3 years ago • 0 comments

The Jpython python parser strips 0's from the end of numeric literals. This is annoying and means that, e.g., "2.0" can't be a "constructor for a floating point number". Example:

jsage: def Number(s): print("Number", s)
... 
jsage: 1.5
Number 1.5
jsage: 1.00001
Number 1.00001
jsage: 1.0000
Number 1

What should happen is the string 1.0000 gets passed to the Number function.

williamstein avatar Jan 25 '22 17:01 williamstein