Re: scm_c_make_gsubr parameters

2010-01-03 Thread guign
On 00:38 Sun 03 Jan , Ludovic Courtès wrote: > 10 is the real limit, and I agree it should be documented. Would you > like to propose a patch? Yes, I'll see to it :)

Re: strange behaviour of (floor .)

2010-01-03 Thread guign
> Here, `truncate' is preferred because (floor -12.34) => -13.0. good point :) > Note, however, that usually it is better (less fiddly) > to represent monetary values as integers. yeah, I think I will use integers for such stuff in the future. my monetary values usually don't exceed standard 32 bi

scm_c_make_gsubr parameters

2009-12-30 Thread guign
Hello all :) I just found that guile does not like primitive procedures with a lot of arguments. ERROR in scm_c_make_gsubr: too many args (11) func The (procedure-properties) show correct arities, e.g. scm_c_define_gsubr(..., 9, 0, 0, ...) (arity 9 0 #f) scm_c_d

Re: strange behaviour of (floor .)

2009-12-28 Thread guign
Hej... > > The actual result shoud be 34. > That's one of the answers you will get if you use a computer to > calculate the results. ... what every computer scientist should know about floating point numbers... ;) seems like I didn't think about it, sorry :) the number in my example is in fact

strange behaviour of (floor .)

2009-12-28 Thread guign
Hej all :) I'm a little confused by the results of (floor .) in a simple computation to get the fractional part of a monetary value. Maybe someone can comment on this, as especially in the last test case below the results seem very strange to me... The starting point is: guile> (rationalize (flo