From e92449e75601bbbb93788efcc3655df6788174a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Tue, 14 Dec 1999 23:50:00 -0800 Subject: [PATCH] bignums more compatible with integers.. Rev: src/operators.c:1.79 --- src/operators.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/operators.c b/src/operators.c index ee2465a27b..41786f8178 100644 --- a/src/operators.c +++ b/src/operators.c @@ -6,7 +6,7 @@ /**/ #include "global.h" #include <math.h> -RCSID("$Id: operators.c,v 1.78 1999/12/15 01:40:34 grubba Exp $"); +RCSID("$Id: operators.c,v 1.79 1999/12/15 07:50:00 hubbe Exp $"); #include "interpret.h" #include "svalue.h" #include "multiset.h" @@ -597,6 +597,25 @@ static int float_promote(void) sp[-1].type=T_FLOAT; return 1; } + +#ifdef AUTO_BIGNUM + if(is_bignum_object_in_svalue(sp-2) && sp[-1].type==T_FLOAT) + { + stack_swap(); + push_constant_text(tFloat); + stack_swap(); + f_cast(); + stack_swap(); + return 1; + } + else if(is_bignum_object_in_svalue(sp-1) && sp[-2].type==T_FLOAT) + { + push_constant_text(tFloat); + stack_swap(); + f_cast(); + return 1; + } +#endif return 0; } -- GitLab