fix bug parsing polar notation conbined with #e
svn: r14878
This commit is contained in:
parent
af94e11d19
commit
de5bbaff40
|
@ -2060,6 +2060,10 @@
|
|||
(test #t symbol? '1+ei)
|
||||
(test #t symbol? '|1/0|)
|
||||
|
||||
(test #t inexact? (string->number "4@5"))
|
||||
(test #f inexact? (string->number "#e4@5"))
|
||||
(test #f inexact? (string->number "#e4.0@5.0"))
|
||||
|
||||
(arity-test string->number 1 2)
|
||||
(arity-test number->string 1 2)
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
(5000.0 "1#/2#e4")
|
||||
(500000000.0 "1/2#e10")
|
||||
(500000000 "#e1/2#e10")
|
||||
(1.6140901064495858e+019-50176.0i "#e#x+e#s+e@-e#l-e")
|
||||
(16140901064495857664-50176i "#e#x+e#s+e@-e#l-e")
|
||||
|
||||
(#f "d")
|
||||
(D "D")
|
||||
|
|
|
@ -876,12 +876,17 @@ Scheme_Object *scheme_read_number(const mzchar *str, long len,
|
|||
|
||||
#ifdef MZ_USE_SINGLE_FLOATS
|
||||
if (SCHEME_FLTP(n1) && SCHEME_FLTP(n2))
|
||||
return scheme_make_complex(scheme_make_float((float)r1),
|
||||
n1 = scheme_make_complex(scheme_make_float((float)r1),
|
||||
scheme_make_float((float)r2));
|
||||
else
|
||||
#endif
|
||||
|
||||
return scheme_make_complex(scheme_make_double(r1),
|
||||
n1 = scheme_make_complex(scheme_make_double(r1),
|
||||
scheme_make_double(r2));
|
||||
|
||||
if (is_not_float)
|
||||
n1 = scheme_inexact_to_exact(1, &n1);
|
||||
|
||||
return n1;
|
||||
}
|
||||
|
||||
has_decimal = has_slash = has_hash = has_hash_since_slash = has_expt = 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user