> On Jan 15, 2017, at 4:12 AM, Peter Bex <[email protected]> wrote:
> 
> On Sat, Jan 14, 2017 at 10:17:14PM -0500, Robert Altenburg wrote:
>> Is this a bug that others can replicate? Any idea what's going on?
> 
> Hello Robert,
> 
> This looks like either a bug in the "mathh" egg, or a bug in
> CHICKEN that's triggered by the mathh egg.
> 
> The .inline file that mathh installs contains this code:
> 
> (mathh#gamma
>  (##core#lambda
>    (f_684 #t (k685 double176179) 12)
>    (let (g178180)
>      (##core#inline_allocate ("C_a_i_bytevector" 6) '(4))
>      (let (r688)
>        (##core#inline
>          ("C_i_foreign_flonum_argumentp")
>          (##core#variable (double176179)))
>        (##core#call
>          (#t)
>          (##core#variable (k685))
>          (##core#inline
>            (stub177)
>            (##core#variable (g178180))
>            (##core#variable (r688))))))))
> 
> But the stub isn't defined anywhere.  Maybe Kon (the egg's maintainer)
> can shed some light on how this is supposed to work?

Yes, I wondered about stub177. Here is the scheme call & mathh definition:

        (use mathh)

        (define (factorial x)
                (gamma (+ 1 x)) )

        (factorial 9) 
        
        ---

        (define gamma
                (cond-expand
                        (windows (lambda-unimplemented 'gamma) )
                        (linux (foreign-lambda double "tgamma" double) )
                        (macosx (foreign-lambda double "tgamma" double) )
                        (else (foreign-lambda double "gamma" double) ) ) ) 

Um, not my stub. At least not explicitly.

> 
> Cheers,
> Peter


_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to