On Sun, May 05, 2019 at 08:00:18AM -0700, C K Kashyap wrote: > : (scl 2) > -> 2 > : (parseJson "{\"a\": 10.1}") > -> (("a" . 1010)) > : (parseJson "{\"a\": 10}") > -> (("a" . 10)) > > Shouldn't 10 be scaled to 1000? Did I miss something here or is there > something I need to do so that all the numbers are normalized?
No, 10 is correct. Keep in mind that PicoLisp really only has integers, which may be handled by a program as scaled fixpoinbn numbers. So the dot in 10.1 is in fact enly a read macro, scaling the number while *reading* it. I recommend Rick's excellent introduction to PicoLisp fixpoint numbers https://the-m6.net/blog/fixed-point-arithmetic-in-picolisp/ ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe