Hi Alex,

> Please take a look in "src/ext.c". There is, for example, 'ext:Sin',
> that interfaces to scaled integers:
>
> =A0 : (ext:Sin 314159 100000)
> =A0 -> 0
> =A0 : (ext:Cos 314159 100000)
> =A0 -> -100000

Ah, Thanks. Could you please explain how a "double" value is encoded
in "cell"? I could not "decipher" doubleToNum() and numToDouble() in
big.c!

A tutorial on PicoLisp FFI would be great; with that, PicoLisp would
have no shortage of libraries! ;-)


> If you set '*Scl', you can make it a little more readable:
>
> =A0 : (setq *Scl 5)
> =A0 -> 5
>
> =A0 : (ext:Cos 3.14159 1.0)
> =A0 -> -100000
> =A0 : (ext:Sin 0.5 1.0)
> =A0 -> 47943
>
> =A0 : (format (ext:Cos 3.14159 1.0) *Scl)
> =A0 -> "-1.00000"
> =A0 : (format (ext:Sin 0.5 1.0) *Scl)
> =A0 -> "0.47943"

By the way, is the result of following code expected?
   : *Scl
   -> 0
   : (let *Scl 2 1.23)
   -> 1
Is this because 1.23 is "parsed" when *Scl is still 0, right? Is there
a better way than using:
   : (let *Scl 2 (format "1.23" *Scl))
   -> 123


More questions ;-)

1. What does 'mis>' stand for?

2. Why a "reverse" association list (instead of a normal association
list) is used for the "property list"?
   : (putl 'X '((10 . a) (20 . b))) (show 'X)
   X NIL
      b 20
      a 10
   -> X

Thanks for your time answering my questions.

Best regards,
KS
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to