372 |
/* Coerce X to single-float if one arg, |
/* Coerce X to single-float if one arg, |
373 |
otherwise coerce to same float type as second arg */ |
otherwise coerce to same float type as second arg */ |
374 |
|
|
375 |
void |
LFD(Lfloat)(void) |
|
Lfloat(void) |
|
376 |
{ |
{ |
377 |
double d; |
double d; |
378 |
int narg; |
int narg; |
424 |
vs_push(x); |
vs_push(x); |
425 |
} |
} |
426 |
|
|
427 |
void |
LFD(Lnumerator)(void) |
|
Lnumerator(void) |
|
428 |
{ |
{ |
429 |
check_arg(1); |
check_arg(1); |
430 |
check_type_rational(&vs_base[0]); |
check_type_rational(&vs_base[0]); |
432 |
vs_base[0] = vs_base[0]->rat.rat_num; |
vs_base[0] = vs_base[0]->rat.rat_num; |
433 |
} |
} |
434 |
|
|
435 |
void |
LFD(Ldenominator)(void) |
|
Ldenominator(void) |
|
436 |
{ |
{ |
437 |
check_arg(1); |
check_arg(1); |
438 |
check_type_rational(&vs_base[0]); |
check_type_rational(&vs_base[0]); |
442 |
vs_base[0] = small_fixnum(1); |
vs_base[0] = small_fixnum(1); |
443 |
} |
} |
444 |
|
|
445 |
void |
LFD(Lfloor)(void) |
|
Lfloor(void) |
|
446 |
{ |
{ |
447 |
object x, y, q, q1; |
object x, y, q, q1; |
448 |
double d; |
double d; |
565 |
} |
} |
566 |
} |
} |
567 |
|
|
568 |
void |
LFD(Lceiling)(void) |
|
Lceiling(void) |
|
569 |
{ |
{ |
570 |
object x, y, q, q1; |
object x, y, q, q1; |
571 |
double d; |
double d; |
688 |
} |
} |
689 |
} |
} |
690 |
|
|
691 |
void |
LFD(Ltruncate)(void) |
|
Ltruncate(void) |
|
692 |
{ |
{ |
693 |
object x, y, q, q1; |
object x, y, q, q1; |
694 |
int n; |
int n; |
772 |
} |
} |
773 |
} |
} |
774 |
|
|
775 |
void |
LFD(Lround)(void) |
|
Lround(void) |
|
776 |
{ |
{ |
777 |
object x, y, q, q1, r; |
object x, y, q, q1, r; |
778 |
double d; |
double d; |
904 |
} |
} |
905 |
} |
} |
906 |
|
|
907 |
void |
LFD(Lmod)(void) |
|
Lmod(void) |
|
908 |
{ |
{ |
909 |
check_arg(2); |
check_arg(2); |
910 |
Lfloor(); |
Lfloor(); |
911 |
vs_base++; |
vs_base++; |
912 |
} |
} |
913 |
|
|
914 |
void |
LFD(Lrem)(void) |
|
Lrem(void) |
|
915 |
{ |
{ |
916 |
check_arg(2); |
check_arg(2); |
917 |
Ltruncate(); |
Ltruncate(); |
919 |
} |
} |
920 |
|
|
921 |
|
|
922 |
void |
LFD(Ldecode_float)(void) |
|
Ldecode_float(void) |
|
923 |
{ |
{ |
924 |
object x; |
object x; |
925 |
double d; |
double d; |
962 |
} |
} |
963 |
} |
} |
964 |
|
|
965 |
void |
LFD(Lscale_float)(void) |
|
Lscale_float(void) |
|
966 |
{ |
{ |
967 |
object x; |
object x; |
968 |
double d; |
double d; |
1012 |
vs_base[0] = make_longfloat(d); |
vs_base[0] = make_longfloat(d); |
1013 |
} |
} |
1014 |
|
|
1015 |
void |
LFD(Lfloat_radix)(void) |
|
Lfloat_radix(void) |
|
1016 |
{ |
{ |
1017 |
check_arg(1); |
check_arg(1); |
1018 |
check_type_float(&vs_base[0]); |
check_type_float(&vs_base[0]); |
1033 |
#endif |
#endif |
1034 |
} |
} |
1035 |
|
|
1036 |
void |
LFD(Lfloat_sign)(void) |
|
Lfloat_sign(void) |
|
1037 |
{ |
{ |
1038 |
object x; |
object x; |
1039 |
int narg; |
int narg; |
1071 |
vs_push(make_longfloat(f)); |
vs_push(make_longfloat(f)); |
1072 |
} |
} |
1073 |
|
|
1074 |
void |
LFD(Lfloat_digits)(void) |
|
Lfloat_digits(void) |
|
1075 |
{ |
{ |
1076 |
check_arg(1); |
check_arg(1); |
1077 |
check_type_float(&vs_base[0]); |
check_type_float(&vs_base[0]); |
1081 |
vs_base[0] = small_fixnum(53); |
vs_base[0] = small_fixnum(53); |
1082 |
} |
} |
1083 |
|
|
1084 |
void |
LFD(Lfloat_precision)(void) |
|
Lfloat_precision(void) |
|
1085 |
{ |
{ |
1086 |
object x; |
object x; |
1087 |
|
|
1114 |
#endif |
#endif |
1115 |
} |
} |
1116 |
|
|
1117 |
void |
LFD(Linteger_decode_float)(void) |
|
Linteger_decode_float(void) |
|
1118 |
{ |
{ |
1119 |
object x; |
object x; |
1120 |
int h, l, e, s; |
int h, l, e, s; |
1139 |
} |
} |
1140 |
} |
} |
1141 |
|
|
1142 |
void |
LFD(Lcomplex)(void) |
|
Lcomplex(void) |
|
1143 |
{ |
{ |
1144 |
object r, i; |
object r, i; |
1145 |
int narg; |
int narg; |
1161 |
vs_push(make_complex(r, i)); |
vs_push(make_complex(r, i)); |
1162 |
} |
} |
1163 |
|
|
1164 |
void |
LFD(Lrealpart)(void) |
|
Lrealpart(void) |
|
1165 |
{ |
{ |
1166 |
object x; |
object x; |
1167 |
|
|
1172 |
vs_base[0] = x->cmp.cmp_real; |
vs_base[0] = x->cmp.cmp_real; |
1173 |
} |
} |
1174 |
|
|
1175 |
void |
LFD(Limagpart)(void) |
|
Limagpart(void) |
|
1176 |
{ |
{ |
1177 |
object x; |
object x; |
1178 |
|
|