I can't answer why it returns 1000001 for (exp 1). You can try (exp 1.0) it returns 2718282. This works fine till scl is 8 or less, anything more it simply returns T.

(load '@lib/math.l) (exp 1) -> 1000001 (exp 1.0) ->2718282 (scl 8) (exp 1.0) -> 2688...200 (50 digits number) (scl 9) # or any bigger value like 11 -> T -------- Original Message -------- On 29 Jan 2018 3:49 am, Henrik Sarvell wrote: > Hi list, long time no see! > The definition of exp in math.l leads me to believe that we're calling this C > function: https://www.tutorialspoint.com/c_standard_library/c_function_exp.htm > > Since we can't do floating numbers in PL and I notice that math.l uses (scl > 6) I would hope to get get something like 2718281 back from this call: > (println (exp 1)). > But that is not happening, instead I get 1000001. > Related is my current project which is converting this naive / simple neural > network written in Python to PL: > https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1 > > Where I'm currently stuck on the sigmoid function which in turn is making use > of exp.