comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » GDL weirdness (bug?) with modulo command
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: GDL weirdness (bug?) with modulo command [message #88357 is a reply to message #88345] Wed, 16 April 2014 12:14 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Wednesday, April 16, 2014 3:55:15 AM UTC-4, rj...@le.ac.uk wrote:
> Yeah, that's why I posted here rather than submitting a GDL bug report. I thought it might be some subtlety like that which wasn't actually a bug. However, mod behaves as I'd expect in IDL and it's only GDL with this issue.
>
>
>
> I think that points to a bug or dodgy implementation in GDL...?

Let's use your example.

print, (200.0 MOD 12) - 8.0

On IDL the result is 0.0. I agree, that's the expected value, because floating point should be able to calculate this exactly. But I would also argue that any value within 0 +/- EPS is consistent with 0.

Craig

EPS = (machar()).eps
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Assigning the values of a matrix to a larger matrix
Next Topic: Contour labels not aligned with contours

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:05:55 PDT 2025

Total time taken to generate the page: 0.04896 seconds