Unboxed type SHORT-FLOAT removed from the core.

parent 0e3b1c38
...@@ -235,10 +235,6 @@ ecl_alloc_object(cl_type t) ...@@ -235,10 +235,6 @@ ecl_alloc_object(cl_type t)
return MAKE_FIXNUM(0); /* Immediate fixnum */ return MAKE_FIXNUM(0); /* Immediate fixnum */
case t_character: case t_character:
return CODE_CHAR('\0'); /* Immediate character */ return CODE_CHAR('\0'); /* Immediate character */
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
return make_shortfloat(0.0); /* Immediate float */
#endif
default:; default:;
} }
......
...@@ -495,9 +495,6 @@ ecl_alloc_object(cl_type t) ...@@ -495,9 +495,6 @@ ecl_alloc_object(cl_type t)
return MAKE_FIXNUM(0); /* Immediate fixnum */ return MAKE_FIXNUM(0); /* Immediate fixnum */
case t_character: case t_character:
return CODE_CHAR(' '); /* Immediate character */ return CODE_CHAR(' '); /* Immediate character */
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
#endif
#ifdef ECL_LONG_FLOAT #ifdef ECL_LONG_FLOAT
case t_longfloat: case t_longfloat:
#endif #endif
......
...@@ -77,10 +77,6 @@ ecl_to_fixnum(cl_object x) ...@@ -77,10 +77,6 @@ ecl_to_fixnum(cl_object x)
/* case t_character: return (cl_fixnum)CHAR_CODE(x); */ /* case t_character: return (cl_fixnum)CHAR_CODE(x); */
case t_ratio: case t_ratio:
return (cl_fixnum)ecl_to_double(x); return (cl_fixnum)ecl_to_double(x);
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
return (cl_fixnum)ecl_short_float(x);
#endif
case t_singlefloat: case t_singlefloat:
return (cl_fixnum)sf(x); return (cl_fixnum)sf(x);
case t_doublefloat: case t_doublefloat:
...@@ -103,10 +99,6 @@ ecl_to_unsigned_integer(cl_object x) ...@@ -103,10 +99,6 @@ ecl_to_unsigned_integer(cl_object x)
return fixnnint(x); return fixnnint(x);
case t_ratio: case t_ratio:
return (cl_index)ecl_to_double(x); return (cl_index)ecl_to_double(x);
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
return (cl_index)ecl_short_float(x);
#endif
case t_singlefloat: case t_singlefloat:
return (cl_index)sf(x); return (cl_index)sf(x);
case t_doublefloat: case t_doublefloat:
...@@ -131,10 +123,6 @@ ecl_to_float(cl_object x) ...@@ -131,10 +123,6 @@ ecl_to_float(cl_object x)
case t_bignum: case t_bignum:
case t_ratio: case t_ratio:
return ecl_to_double(x); return ecl_to_double(x);
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
return ecl_short_float(x);
#endif
case t_singlefloat: case t_singlefloat:
return sf(x); return sf(x);
case t_doublefloat: case t_doublefloat:
......
...@@ -1064,20 +1064,12 @@ fmt_exponential_float(format_stack fmt, bool colon, bool atsign) ...@@ -1064,20 +1064,12 @@ fmt_exponential_float(format_stack fmt, bool colon, bool atsign)
} else if (y == @'single-float') { } else if (y == @'single-float') {
t = t_singlefloat; t = t_singlefloat;
} else { } else {
#ifdef ECL_SHORT_FLOAT
t = t_shortfloat;
#else
t = t_singlefloat; t = t_singlefloat;
#endif
} }
if (type_of(x) == t) if (type_of(x) == t)
exponentchar = 'E'; exponentchar = 'E';
else if (type_of(x) == t_singlefloat) else if (type_of(x) == t_singlefloat)
exponentchar = 'F'; exponentchar = 'F';
#ifdef ECL_SHORT_FLOAT
else if (type_of(x) == t_shortfloat)
exponentchar = 'S';
#endif
#ifdef ECL_LONG_FLOAT #ifdef ECL_LONG_FLOAT
else if (type_of(x) == t_longfloat) else if (type_of(x) == t_longfloat)
exponentchar = 'L'; exponentchar = 'L';
......
...@@ -153,9 +153,6 @@ BEGIN: ...@@ -153,9 +153,6 @@ BEGIN:
mark_next(x->ratio.den); mark_next(x->ratio.den);
break; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
#endif
case t_singlefloat: case t_singlefloat:
case t_doublefloat: case t_doublefloat:
#ifdef ECL_LONG_FLOAT #ifdef ECL_LONG_FLOAT
......
...@@ -54,12 +54,6 @@ _hash_eql(cl_hashkey h, cl_object x) ...@@ -54,12 +54,6 @@ _hash_eql(cl_hashkey h, cl_object x)
case t_ratio: case t_ratio:
h = _hash_eql(h, x->ratio.num); h = _hash_eql(h, x->ratio.num);
return _hash_eql(h, x->ratio.den); return _hash_eql(h, x->ratio.den);
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: {
float f = ecl_short_float(x);
return hash_string(h, (unsigned char*)&f, sizeof(f));
}
#endif
case t_singlefloat: case t_singlefloat:
return hash_string(h, (unsigned char*)&sf(x), sizeof(sf(x))); return hash_string(h, (unsigned char*)&sf(x), sizeof(sf(x)));
case t_doublefloat: case t_doublefloat:
...@@ -127,12 +121,6 @@ _hash_equal(int depth, cl_hashkey h, cl_object x) ...@@ -127,12 +121,6 @@ _hash_equal(int depth, cl_hashkey h, cl_object x)
case t_random: case t_random:
return _hash_equal(0, h, x->random.value); return _hash_equal(0, h, x->random.value);
#ifdef ECL_SIGNED_ZERO #ifdef ECL_SIGNED_ZERO
# ifdef ECL_SHORT_FLOAT
case t_shortfloat: {
float f = ecl_short_float(x);
return hash_string(h, (unsigned char*)&f, sizeof(f));
}
# endif
case t_singlefloat: { case t_singlefloat: {
float f = sf(x); float f = sf(x);
if (f == 0.0) f = 0.0; if (f == 0.0) f = 0.0;
...@@ -198,16 +186,6 @@ _hash_equalp(int depth, cl_hashkey h, cl_object x) ...@@ -198,16 +186,6 @@ _hash_equalp(int depth, cl_hashkey h, cl_object x)
return h; return h;
case t_fixnum: case t_fixnum:
return hash_word(h, fix(x)); return hash_word(h, fix(x));
#ifdef HAVE_SHORT_FLOAT
case t_shortfloat: {
/* FIXME! We should be more precise here! */
return hash_word(h, (cl_index)sf(x));
union { float f; cl_index w; } x;
x.w = 0;
x.f = ecl_short_float(x);
return hash_word(h, x.w);
}
#endif
case t_singlefloat: case t_singlefloat:
/* FIXME! We should be more precise here! */ /* FIXME! We should be more precise here! */
return hash_word(h, (cl_index)sf(x)); return hash_word(h, (cl_index)sf(x));
......
...@@ -281,9 +281,6 @@ cl_class_of(cl_object x) ...@@ -281,9 +281,6 @@ cl_class_of(cl_object x)
index = ECL_BUILTIN_INTEGER; break; index = ECL_BUILTIN_INTEGER; break;
case t_ratio: case t_ratio:
index = ECL_BUILTIN_RATIO; break; index = ECL_BUILTIN_RATIO; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
#endif
case t_singlefloat: case t_singlefloat:
case t_doublefloat: case t_doublefloat:
#ifdef ECL_LONG_FLOAT #ifdef ECL_LONG_FLOAT
......
...@@ -161,9 +161,6 @@ static const char *feature_names[] = { ...@@ -161,9 +161,6 @@ static const char *feature_names[] = {
#ifdef ECL_LONG_FLOAT #ifdef ECL_LONG_FLOAT
"LONG-FLOAT", "LONG-FLOAT",
#endif #endif
#ifdef ECL_SHORT_FLOAT
"SHORT-FLOAT",
#endif
#ifdef ECL_RELATIVE_PACKAGE_NAMES #ifdef ECL_RELATIVE_PACKAGE_NAMES
"RELATIVE-PACKAGE-NAMES", "RELATIVE-PACKAGE-NAMES",
#endif #endif
......
This diff is collapsed.
...@@ -63,9 +63,6 @@ number_remainder(cl_object x, cl_object y, cl_object q) ...@@ -63,9 +63,6 @@ number_remainder(cl_object x, cl_object y, cl_object q)
ty = t_singlefloat; ty = t_singlefloat;
} }
switch (tx = type_of(x)) { switch (tx = type_of(x)) {
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
#endif
case t_singlefloat: case t_singlefloat:
case t_doublefloat: case t_doublefloat:
#ifdef ECL_LONG_FLOAT #ifdef ECL_LONG_FLOAT
...@@ -77,10 +74,6 @@ number_remainder(cl_object x, cl_object y, cl_object q) ...@@ -77,10 +74,6 @@ number_remainder(cl_object x, cl_object y, cl_object q)
case t_bignum: case t_bignum:
case t_ratio: case t_ratio:
switch (ty) { switch (ty) {
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
x = make_shortfloat(ecl_to_double(x)); break;
#endif
case t_singlefloat: case t_singlefloat:
x = ecl_make_singlefloat(ecl_to_double(x)); break; x = ecl_make_singlefloat(ecl_to_double(x)); break;
case t_doublefloat: case t_doublefloat:
...@@ -147,15 +140,6 @@ ecl_floor1(cl_object x) ...@@ -147,15 +140,6 @@ ecl_floor1(cl_object x)
v0 = ecl_floor2(x->ratio.num, x->ratio.den); v0 = ecl_floor2(x->ratio.num, x->ratio.den);
v1 = ecl_make_ratio(VALUES(1), x->ratio.den); v1 = ecl_make_ratio(VALUES(1), x->ratio.den);
break; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: {
float d = ecl_short_float(x);
float y = floorf(d);
v0 = float_to_integer(y);
v1 = make_shortfloat(d - y);
break;
}
#endif
case t_singlefloat: { case t_singlefloat: {
float d = sf(x); float d = sf(x);
float y = floorf(d); float y = floorf(d);
...@@ -225,16 +209,6 @@ ecl_floor2(cl_object x, cl_object y) ...@@ -225,16 +209,6 @@ ecl_floor2(cl_object x, cl_object y)
v0 = ecl_floor2(ecl_times(x, y->ratio.den), y->ratio.num); v0 = ecl_floor2(ecl_times(x, y->ratio.den), y->ratio.num);
v1 = ecl_make_ratio(VALUES(1), y->ratio.den); v1 = ecl_make_ratio(VALUES(1), y->ratio.den);
break; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: { /* FIX / SF */
float n = ecl_short_float(y);
float p = fix(x) / n;
float q = floorf(p);
v0 = float_to_integer(q);
v1 = make_shortfloat((p - q)*n);
break;
}
#endif
case t_singlefloat: { /* FIX / SF */ case t_singlefloat: { /* FIX / SF */
float n = sf(y); float n = sf(y);
float p = fix(x) / n; float p = fix(x) / n;
...@@ -281,16 +255,6 @@ ecl_floor2(cl_object x, cl_object y) ...@@ -281,16 +255,6 @@ ecl_floor2(cl_object x, cl_object y)
v0 = ecl_floor2(ecl_times(x, y->ratio.den), y->ratio.num); v0 = ecl_floor2(ecl_times(x, y->ratio.den), y->ratio.num);
v1 = ecl_make_ratio(VALUES(1), y->ratio.den); v1 = ecl_make_ratio(VALUES(1), y->ratio.den);
break; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: { /* BIG / SF */
float n = ecl_short_float(y);
float p = _ecl_big_to_double(x) / n;
float q = floorf(p);
v0 = float_to_integer(q);
v1 = make_shortfloat((p - q)*n);
break;
}
#endif
case t_singlefloat: { /* BIG / SF */ case t_singlefloat: { /* BIG / SF */
float n = sf(y); float n = sf(y);
float p = _ecl_big_to_double(x) / n; float p = _ecl_big_to_double(x) / n;
...@@ -333,16 +297,6 @@ ecl_floor2(cl_object x, cl_object y) ...@@ -333,16 +297,6 @@ ecl_floor2(cl_object x, cl_object y)
v1 = ecl_divide(VALUES(1), x->ratio.den); v1 = ecl_divide(VALUES(1), x->ratio.den);
} }
break; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: { /* SF / ANY */
float n = ecl_to_double(y);
float p = sf(x)/n;
float q = floorf(p);
v0 = float_to_integer(q);
v1 = make_shortfloat(p*n - q*n);
break;
}
#endif
case t_singlefloat: { /* SF / ANY */ case t_singlefloat: { /* SF / ANY */
float n = ecl_to_double(y); float n = ecl_to_double(y);
float p = sf(x)/n; float p = sf(x)/n;
...@@ -401,15 +355,6 @@ ecl_ceiling1(cl_object x) ...@@ -401,15 +355,6 @@ ecl_ceiling1(cl_object x)
v0 = ecl_ceiling2(x->ratio.num, x->ratio.den); v0 = ecl_ceiling2(x->ratio.num, x->ratio.den);
v1 = ecl_make_ratio(VALUES(1), x->ratio.den); v1 = ecl_make_ratio(VALUES(1), x->ratio.den);
break; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: {
float d = ecl_short_float(x);
float y = ceilf(d);
v0 = float_to_integer(y);
v1 = make_shortfloat(d - y);
break;
}
#endif
case t_singlefloat: { case t_singlefloat: {
float d = sf(x); float d = sf(x);
float y = ceilf(d); float y = ceilf(d);
...@@ -479,16 +424,6 @@ ecl_ceiling2(cl_object x, cl_object y) ...@@ -479,16 +424,6 @@ ecl_ceiling2(cl_object x, cl_object y)
v0 = ecl_ceiling2(ecl_times(x, y->ratio.den), y->ratio.num); v0 = ecl_ceiling2(ecl_times(x, y->ratio.den), y->ratio.num);
v1 = ecl_make_ratio(VALUES(1), y->ratio.den); v1 = ecl_make_ratio(VALUES(1), y->ratio.den);
break; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: { /* FIX / SF */
float n = ecl_short_float(y);
float p = fix(x)/n;
float q = ceilf(p);
v0 = float_to_integer(q);
v1 = ecl_make_singlefloat(p*n - q*n);
break;
}
#endif
case t_singlefloat: { /* FIX / SF */ case t_singlefloat: { /* FIX / SF */
float n = sf(y); float n = sf(y);
float p = fix(x)/n; float p = fix(x)/n;
...@@ -535,16 +470,6 @@ ecl_ceiling2(cl_object x, cl_object y) ...@@ -535,16 +470,6 @@ ecl_ceiling2(cl_object x, cl_object y)
v0 = ecl_ceiling2(ecl_times(x, y->ratio.den), y->ratio.num); v0 = ecl_ceiling2(ecl_times(x, y->ratio.den), y->ratio.num);
v1 = ecl_make_ratio(VALUES(1), y->ratio.den); v1 = ecl_make_ratio(VALUES(1), y->ratio.den);
break; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: { /* BIG / SF */
float n = ecl_short_float(y);
float p = _ecl_big_to_double(x)/n;
float q = ceilf(p);
v0 = float_to_integer(q);
v1 = make_shortfloat(p*n - q*n);
break;
}
#endif
case t_singlefloat: { /* BIG / SF */ case t_singlefloat: { /* BIG / SF */
float n = sf(y); float n = sf(y);
float p = _ecl_big_to_double(x)/n; float p = _ecl_big_to_double(x)/n;
...@@ -587,16 +512,6 @@ ecl_ceiling2(cl_object x, cl_object y) ...@@ -587,16 +512,6 @@ ecl_ceiling2(cl_object x, cl_object y)
v1 = ecl_divide(VALUES(1), x->ratio.den); v1 = ecl_divide(VALUES(1), x->ratio.den);
} }
break; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: { /* SF / ANY */
float n = ecl_to_double(y);
float p = sf(x)/n;
float q = ceilf(p);
v0 = float_to_integer(q);
v1 = make_shortfloat(p*n - q*n);
break;
}
#endif
case t_singlefloat: { /* SF / ANY */ case t_singlefloat: { /* SF / ANY */
float n = ecl_to_double(y); float n = ecl_to_double(y);
float p = sf(x)/n; float p = sf(x)/n;
...@@ -653,15 +568,6 @@ ecl_truncate1(cl_object x) ...@@ -653,15 +568,6 @@ ecl_truncate1(cl_object x)
v0 = ecl_truncate2(x->ratio.num, x->ratio.den); v0 = ecl_truncate2(x->ratio.num, x->ratio.den);
v1 = ecl_make_ratio(VALUES(1), x->ratio.den); v1 = ecl_make_ratio(VALUES(1), x->ratio.den);
break; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: {
float d = ecl_short_float(x);
float y = d > 0? floorf(d) : ceilf(d);
v0 = float_to_integer(y);
v1 = make_shortfloat(d - y);
break;
}
#endif
case t_singlefloat: { case t_singlefloat: {
float d = sf(x); float d = sf(x);
float y = d > 0? floorf(d) : ceilf(d); float y = d > 0? floorf(d) : ceilf(d);
...@@ -765,11 +671,6 @@ ecl_round1(cl_object x) ...@@ -765,11 +671,6 @@ ecl_round1(cl_object x)
v0 = ecl_round2(x->ratio.num, x->ratio.den); v0 = ecl_round2(x->ratio.num, x->ratio.den);
v1 = ecl_make_ratio(VALUES(1), x->ratio.den); v1 = ecl_make_ratio(VALUES(1), x->ratio.den);
break; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
f = ecl_short_float(x);
goto FLOAT;
#endif
case t_singlefloat: { case t_singlefloat: {
float d = sf(x); float d = sf(x);
float q = round_double(d); float q = round_double(d);
...@@ -874,11 +775,6 @@ cl_decode_float(cl_object x) ...@@ -874,11 +775,6 @@ cl_decode_float(cl_object x)
float f; float f;
switch (tx) { switch (tx) {
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
f = ecl_short_float(x);
goto FLOAT;
#endif
case t_singlefloat: { case t_singlefloat: {
f = sf(x); f = sf(x);
FLOAT: FLOAT:
...@@ -936,11 +832,6 @@ cl_scale_float(cl_object x, cl_object y) ...@@ -936,11 +832,6 @@ cl_scale_float(cl_object x, cl_object y)
FEwrong_type_nth_arg(@[scale-float],2,y,@[fixnum]); FEwrong_type_nth_arg(@[scale-float],2,y,@[fixnum]);
} }
switch (type_of(x)) { switch (type_of(x)) {
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
x = make_shortfloat(ldexpf(ecl_short_float(x), k));
break;
#endif
case t_singlefloat: case t_singlefloat:
x = ecl_make_singlefloat(ldexpf(sf(x), k)); x = ecl_make_singlefloat(ldexpf(sf(x), k));
break; break;
...@@ -975,10 +866,6 @@ cl_float_radix(cl_object x) ...@@ -975,10 +866,6 @@ cl_float_radix(cl_object x)
y = cl_float(2, MAKE_FIXNUM(1), x); y = cl_float(2, MAKE_FIXNUM(1), x);
} }
switch (type_of(x)) { switch (type_of(x)) {
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
negativep = signbit(ecl_short_float(x)); break;
#endif
case t_singlefloat: case t_singlefloat:
negativep = signbit(sf(x)); break; negativep = signbit(sf(x)); break;
case t_doublefloat: case t_doublefloat:
...@@ -991,13 +878,6 @@ cl_float_radix(cl_object x) ...@@ -991,13 +878,6 @@ cl_float_radix(cl_object x)
FEwrong_type_nth_arg(@[float-sign],1,x,@[float]); FEwrong_type_nth_arg(@[float-sign],1,x,@[float]);
} }
switch (type_of(y)) { switch (type_of(y)) {
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: {
float f = ecl_short_float(y);
if (signbit(f) != negativep) y = make_shortfloat(-f);
break;
}
#endif
case t_singlefloat: { case t_singlefloat: {
float f = sf(y); float f = sf(y);
if (signbit(f) != negativep) y = ecl_make_singlefloat(-f); if (signbit(f) != negativep) y = ecl_make_singlefloat(-f);
...@@ -1026,9 +906,6 @@ cl_float_digits(cl_object x) ...@@ -1026,9 +906,6 @@ cl_float_digits(cl_object x)
{ {
const cl_env_ptr the_env = ecl_process_env(); const cl_env_ptr the_env = ecl_process_env();
switch (type_of(x)) { switch (type_of(x)) {
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
#endif
case t_singlefloat: case t_singlefloat:
x = MAKE_FIXNUM(FLT_MANT_DIG); x = MAKE_FIXNUM(FLT_MANT_DIG);
break; break;
...@@ -1052,23 +929,6 @@ cl_float_precision(cl_object x) ...@@ -1052,23 +929,6 @@ cl_float_precision(cl_object x)
const cl_env_ptr the_env = ecl_process_env(); const cl_env_ptr the_env = ecl_process_env();
int precision; int precision;
switch (type_of(x)) { switch (type_of(x)) {
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: {
float f = ecl_short_float(x);
if (f == 0.0) {
precision = 0;
} else {
int exp;
frexpf(f, &exp);
if (exp >= FLT_MIN_EXP) {
precision = FLT_MANT_DIG;
} else {
precision = FLT_MANT_DIG - (FLT_MIN_EXP - exp);
}
}
break;
}
#endif
case t_singlefloat: { case t_singlefloat: {
float f = sf(x); float f = sf(x);
if (f == 0.0) { if (f == 0.0) {
...@@ -1180,24 +1040,6 @@ cl_integer_decode_float(cl_object x) ...@@ -1180,24 +1040,6 @@ cl_integer_decode_float(cl_object x)
} }
break; break;
} }
#ifdef ECL_SHORT_FLOAT
case t_shortfloat: {
float d = ecl_short_float(x);
if (signbit(d)) {
s = -1;
d = -d;
}
if (d == 0.0) {
e = 0;
x = MAKE_FIXNUM(0);
} else {
d = frexpf(d, &e);
x = double_to_integer(ldexp(d, FLT_MANT_DIG));
e -= FLT_MANT_DIG;
}
break;
}
#endif
default: default:
FEwrong_type_nth_arg(@[integer-decode-float],1,x,@[float]); FEwrong_type_nth_arg(@[integer-decode-float],1,x,@[float]);
} }
...@@ -1217,9 +1059,6 @@ cl_realpart(cl_object x) ...@@ -1217,9 +1059,6 @@ cl_realpart(cl_object x)
case t_fixnum: case t_fixnum:
case t_bignum: case t_bignum:
case t_ratio: case t_ratio:
#ifdef ECL_SHORT_FLOAT
case t_longfloat:
#endif
case t_singlefloat: case t_singlefloat:
case t_doublefloat: case t_doublefloat:
#ifdef ECL_LONG_FLOAT #ifdef ECL_LONG_FLOAT
...@@ -1244,14 +1083,6 @@ cl_imagpart(cl_object x) ...@@ -1244,14 +1083,6 @@ cl_imagpart(cl_object x)
case t_ratio: case t_ratio:
x = MAKE_FIXNUM(0); x = MAKE_FIXNUM(0);
break; break;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
if (signbit(ecl_short_float(x)))
x = make_shortfloat(-0.0);
else
x = make_shortfloat(0.0);
break;
#endif
case t_singlefloat: case t_singlefloat:
if (signbit(sf(x))) if (signbit(sf(x)))
x = cl_core.singlefloat_minus_zero; x = cl_core.singlefloat_minus_zero;
......
...@@ -103,10 +103,6 @@ ecl_number_equalp(cl_object x, cl_object y) ...@@ -103,10 +103,6 @@ ecl_number_equalp(cl_object x, cl_object y)
case t_bignum: case t_bignum:
case t_ratio: case t_ratio:
return 0; return 0;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
return double_fix_compare(fix(x), ecl_short_float(y)) == 0;
#endif
case t_singlefloat: case t_singlefloat:
return double_fix_compare(fix(x), sf(y)) == 0; return double_fix_compare(fix(x), sf(y)) == 0;
case t_doublefloat: case t_doublefloat:
...@@ -128,9 +124,6 @@ ecl_number_equalp(cl_object x, cl_object y) ...@@ -128,9 +124,6 @@ ecl_number_equalp(cl_object x, cl_object y)
return _ecl_big_compare(x, y)==0; return _ecl_big_compare(x, y)==0;
case t_ratio: case t_ratio:
return 0; return 0;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
#endif
case t_singlefloat: case t_singlefloat:
case t_doublefloat: case t_doublefloat:
#ifdef ECL_LONG_FLOAT #ifdef ECL_LONG_FLOAT
...@@ -151,9 +144,6 @@ ecl_number_equalp(cl_object x, cl_object y) ...@@ -151,9 +144,6 @@ ecl_number_equalp(cl_object x, cl_object y)
case t_ratio: case t_ratio:
return (ecl_number_equalp(x->ratio.num, y->ratio.num) && return (ecl_number_equalp(x->ratio.num, y->ratio.num) &&
ecl_number_equalp(x->ratio.den, y->ratio.den)); ecl_number_equalp(x->ratio.den, y->ratio.den));
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
#endif
case t_singlefloat: case t_singlefloat:
case t_doublefloat: case t_doublefloat:
#ifdef ECL_LONG_FLOAT #ifdef ECL_LONG_FLOAT
...@@ -166,11 +156,6 @@ ecl_number_equalp(cl_object x, cl_object y) ...@@ -166,11 +156,6 @@ ecl_number_equalp(cl_object x, cl_object y)
default: default:
FEwrong_type_nth_arg(@[=], 2, y, @[number]); FEwrong_type_nth_arg(@[=], 2, y, @[number]);
} }
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
dx = ecl_short_float(x);
goto FLOAT;
#endif
case t_singlefloat: case t_singlefloat:
dx = sf(x); dx = sf(x);
goto FLOAT; goto FLOAT;
...@@ -184,10 +169,6 @@ ecl_number_equalp(cl_object x, cl_object y) ...@@ -184,10 +169,6 @@ ecl_number_equalp(cl_object x, cl_object y)
case t_ratio: case t_ratio:
x = cl_rational(x); x = cl_rational(x);
goto BEGIN; goto BEGIN;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
return dx == ecl_short_float(y);
#endif
case t_singlefloat: case t_singlefloat:
return dx == sf(y); return dx == sf(y);
case t_doublefloat: case t_doublefloat:
...@@ -211,10 +192,6 @@ ecl_number_equalp(cl_object x, cl_object y) ...@@ -211,10 +192,6 @@ ecl_number_equalp(cl_object x, cl_object y)
case t_ratio: case t_ratio:
x = cl_rational(x); x = cl_rational(x);
goto BEGIN; goto BEGIN;
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
return dx == ecl_short_float(y);
#endif
case t_singlefloat: case t_singlefloat:
return dx == sf(y); return dx == sf(y);
case t_doublefloat: case t_doublefloat:
...@@ -239,9 +216,6 @@ ecl_number_equalp(cl_object x, cl_object y) ...@@ -239,9 +216,6 @@ ecl_number_equalp(cl_object x, cl_object y)
ecl_number_equalp(x->complex.imag, y->complex.imag)); ecl_number_equalp(x->complex.imag, y->complex.imag));
case t_fixnum: case t_bignum: case t_ratio: case t_fixnum: case t_bignum: case t_ratio:
case t_singlefloat: case t_doublefloat: case t_singlefloat: case t_doublefloat:
#ifdef ECL_SHORT_FLOAT
case t_shortfloat:
#endif
#ifdef ECL_LONG_FLOAT #ifdef ECL_LONG_FLOAT
case t_longfloat: case t_longfloat:
#endif #endif
...@@ -293,10 +267,6 @@ ecl_number_compare(cl_object x, cl_object y) ...@@ -293,10 +267,6 @@ ecl_number_compare(cl_object x, cl_object y)
x = ecl_times(x, y->ratio.den); x = ecl_times(x, y->ratio.den);
y = y->ratio.num; y = y->ratio.num;
return(ecl_number_compare(x, y));