#127 modulo operation crashes on floats

closed-fixed
5
2009-12-21
2009-12-21
No

1) start gretl
2) start the gretl console
3) type "a = 1 % .1", Enter
4) gretl crashes

This can be solved by just replacing
return (int) x % (int) y;
with
return fmod(x, y);
at line 606 of http://gretl.cvs.sourceforge.net/viewvc/gretl/gretl/lib/src/geneval.c?revision=1.459&view=markup .

Discussion

  • Allin Cottrell

    Allin Cottrell - 2009-12-21

    Thanks. Fixed in CVS as per your suggestion.

     
  • Allin Cottrell

    Allin Cottrell - 2009-12-21
    • labels: --> Script commands
    • assigned_to: nobody --> allin
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks