[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] return a float from foreign function
From: |
John Cowan |
Subject: |
Re: [Chicken-users] return a float from foreign function |
Date: |
Sun, 27 Aug 2006 22:41:14 -0400 |
User-agent: |
Mutt/1.3.28i |
Shawn Rutledge scripsit:
> impl.c:
>
> #include <math.h>
>
> float baz(int i)
> {
> return (((float)i) / 15.2);
> }
Note that "float" in Chicken foreign types is a synonym for "double",
whereas "float" in C means single-float and "double" means double-float.
So you need to change the C code to say "double" in both place
in order to get this to work at all (except by luck).
> This is with chicken 2.2 and I think 2.3 also has similar problems. I
> can try 2.41 when it gets done building.
It fails under 2.41 and 2.426 as well.
--
Clear? Huh! Why a four-year-old child John Cowan
could understand this report. Run out address@hidden
and find me a four-year-old child. I http://www.ccil.org/~cowan
can't make head or tail out of it.
--Rufus T. Firefly on government reports
- [Chicken-users] return a float from foreign function, Shawn Rutledge, 2006/08/27
- Re: [Chicken-users] return a float from foreign function,
John Cowan <=
- Re: [Chicken-users] return a float from foreign function, Zbigniew, 2006/08/28
- Re: [Chicken-users] return a float from foreign function, John Cowan, 2006/08/28
- Re: [Chicken-users] return a float from foreign function, Zbigniew, 2006/08/28
- Re: [Chicken-users] return a float from foreign function, John Cowan, 2006/08/28
- Re: [Chicken-users] return a float from foreign function, Zbigniew, 2006/08/28
- Re: [Chicken-users] return a float from foreign function, Shawn Rutledge, 2006/08/28
- Re: [Chicken-users] return a float from foreign function, Zbigniew, 2006/08/28