[gambit-list] automatic int -> double conversion

Marc Feeley feeley at iro.umontreal.ca
Tue May 19 16:48:53 EDT 2009


On 19-May-09, at 4:44 PM, lowly coder wrote:

> This is a lot of manual wrapping. Can I define a 'type' like a  
> lenient-double to have this automatically called? (Then I can sed my  
> *.scm for double -> lenient-double)

Yes you can define your own type with converter functions.  The  
hardest thing to implement is the conversion of bignums and exact  
rationals to double (the exact->inexact function does this in Scheme).

Marc



More information about the Gambit-list mailing list