Re: [Scheme-reports] Padding/placeholders (hashes) in numerical syntax Per Bothner (16 Aug 2011 20:40 UTC)

Re: [Scheme-reports] Padding/placeholders (hashes) in numerical syntax Per Bothner 16 Aug 2011 20:39 UTC

On 08/16/2011 01:01 PM, John Cowan wrote:
> According to a survey I did back in 2009, Kawa and SCM also provide
> single and double floats, but there is no way within R5RS to distinguish
> them: eqv? defers to = for all numbers.  At that time, neither did
> anything useful with the exponent markers.

Kawa currently does do something useful with the exponent markers:
1.0f0 or 1.0s0 returns 32-bit float
1.0d0 or 1.0e0 returns 64-bit double
1.0l0 return java.math.BigDecimal

> But in Racket (eqv? 1.0f0 1.0e0) returns #t and
> so does (= (/ 1.0f0 3.0f0) (/ 1.0e0 3.0e0)).

Kawa correctly returns #f for both of these.

It's arguably a bug that (write  1.0f0) returns "1.0";
it should print "1.0f0"
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports