Hi Jimmie,
> What I didn't see in any of the examples is this
>
> : (format (*/ 9.9 9.789 9.56789 `(* 1.0 1.0)) *Scl)
>-> "927.234744579000"
Good idea! I added this example to the reference of '*/'
♪♫ Alex
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Hello,
Thanks for all the help. It is a little more complicated than in
languages with support for floating point, but it appears manageable. I
think I am slowly wrapping my mind around it.
What I didn't see in any of the examples is this
: (format (*/ 9.9 9.789 9.56789 `(* 1.0 1.0)) *Scl)
Hi Jimmie,
the key is to use the '*/' function for both multiplication and division.
'*' is not very useful here.
> : (format (* 9.9 9.789 9.56789) 20)
> -> "927234744579000."
Instead, try
: (scl 20)
-> 20
: (format (*/ 9.9 9.789 9.56789
On Wed, Jul 12, 2017 at 8:36 PM, Jimmie Houchin wrote:
>
> I didn't know if PicoLisp provided a solution without complicating every
> function which uses multiplication and division.
Yes, the */ function:
http://software-lab.de/doc/ref_.html#*/
I think you just have to provide 1.0 as the last par
On Wed, Jul 12, 2017 at 08:05:42PM +0200, Aatos Heikkinen wrote:
> I´ve found ´format´ and ´round´ functions quite helpful, see
> https://the-m6.net/blog/fixed-point-arithmetic-in-picolisp.html
Yes, this article describes it very well.
Especially, it explains Jimmie's issues with multiplication (
Yes, I understand. But not without complicating the calculation to keep
track of the number of times I have done multiplication in the current
result.
Formating with current scale does not work.
: (format (* 9.9 9.789 9.56789) 20)
-> "927234744579000.000
I´ve found ´format´ and ´round´ functions quite helpful, see
https://the-m6.net/blog/fixed-point-arithmetic-in-picolisp.html
On 12 Jul 2017 18:52, "Jimmie Houchin" wrote:
> Hello,
>
> I am trying to understand something about PicoLisp and Fixpoint numbers.
>
> I am writing an app and would consi
Hello,
I am trying to understand something about PicoLisp and Fixpoint numbers.
I am writing an app and would consider PicoLisp should I get my head
around Lisp. But I do not understand how to use numbers.
I use a lot of floating point numbers and lots of calculations. From
simple experiment