From 57f4d16ee225de244713319d0a56e8b714bcb62b Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Sat, 9 Jun 2007 03:08:36 +0300 Subject: [PATCH] * Added ikrt_fl_log and ikrt_fx_log to the vm. --- bin/ikarus | Bin 63640 -> 67808 bytes bin/ikarus-flonums.c | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/bin/ikarus b/bin/ikarus index a8c78c814cb16e962c51713b546baccbb28926a2..021220d830b0938bd15cd53d9f8b8be3875cc2c9 100755 GIT binary patch delta 7921 zcmZu$34Baf`#$Gp!ekF(i%iy02|*GmK@v)WA|xV~h!$0Qt4K;)8gXr7OdAd@MVp{# z6NH;u8f8Lit0hrX`}chfqP=ONrOVf7ea-(lcbN&F{C>}!=e+0L&U@Z_?#;}m2QJm? z4EgiiDvA16x$e!Lv~Jyjes1-r2pQ)|Nd3Bpech8VZ-hpYoh8yf?y1@^)y|gDK3T5<8ORYa z+w5t{G8-+6*&oeYhG8;4e+I90W5;4tFTb&42|h9`cgK!N7wd=10Y_M8W1!DBD18Yx zPrhMek;QDRF@k=>@{IW=&tgcClr{MV57!c!$gdH9vV5I&b8Ablvq5f)jLQxot-KM} z*=e^xVbUS?gIn~d>jX>9X(m>fCrmsgyI^P~+(}z7_%zzY>`yiCq8TzZ1t{FU=8SR# z9Qh(!vwV}ybdPNT0o?Xe-CD(hYiyspDc8td!S>ZAw$FmgNw}zS$APJF&5pPQkU8Rp zVW6+>;Z?m(dG*Bx_-XeUFT5vrV9hXEMw<;baq%Z=&?}GFP>&$nV@tiwgLXdM`NAsa8dAXJEL_y}zXqlz775$BlRPb!mv4$&t;LFIV*9WX z?V>kIr0joyuiog|=tIb&+2swMRQ$ot`uW5or^P=0xzM)U7b_wsyzt`0Q(W<%AcU~W zZ(>4?{tj1Bc0F{L!cdlfL*^*UcntLFcL!H@-A_(0;h{a%&>ayvLJYDKQeMsX0*%S< zgLHWfEYKFdVuc^Njq58JRLKu7>lt`KMa^LD$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cc0cb55 100644 --- a/bin/ikarus-flonums.c +++ b/bin/ikarus-flonums.c @@ -80,6 +80,14 @@ ikrt_fl_sqrt(ikp x, ikpcb* pcb){ return r; } +ikp +ikrt_fl_log(ikp x, ikpcb* pcb){ + ikp r = ik_alloc(pcb, flonum_size) + vector_tag; + ref(r, -vector_tag) = (ikp)flonum_tag; + flonum_data(r) = log(flonum_data(x)); + return r; +} + @@ -127,6 +135,17 @@ ikrt_fx_atan(ikp x, ikpcb* pcb){ return r; } +ikp +ikrt_fx_log(ikp x, ikpcb* pcb){ + ikp r = ik_alloc(pcb, flonum_size) + vector_tag; + ref(r, -vector_tag) = (ikp)flonum_tag; + flonum_data(r) = log(unfix(x)); + return r; +} + + + + ikp ikrt_flonum_to_bytevector(ikp x, ikp bv, ikpcb* pcb){ if(tagof(x) == vector_tag){