[plt-scheme] inf.0 and nan.0 in embeded program

From: Chongkai Zhu (u0476504 at utah.edu)
Date: Fri Mar 3 18:21:55 EST 2006

Hi all,

In my C program that embeds mzscheme, I would like to have Scheme_object that is "+inf.0"/ "-inf.0"/"+nan.0".

Now I do so by

double zero = 0.0;
scheme_make_double( 1.0 / zero )
scheme_make_double( -1.0 / zero )
scheme_make_double( 1.0 / zero - 1.0 / zero )

This works, but I doubt whether this is the right why. Could anyone please help. Thanks in advance.

Chongkai Zhu

Posted on the users mailing list.