Hi Luis-
I think you are tickling one of the known issues
with proper longlong type support in PDL. Here
is the original bug report (but I don't know if
your problem comes about in exactly the same fashion).
At any rate, it is definitely a wart on the longlong
support.
http://sourceforge.net/p/pdl/bugs/343/
#343 longlong constructor and display lose digits due to implicit
double precision conversions
Regards,
Chris
On 2/16/2015 11:49, Luis Mochan wrote:
This is a nice solution, the answer is also correct. I have to spend
some time trying to understand some PDL nuances there.
I'm attaching a slightly commented versionin case it helps
Not sure why
you're having the errors due to 64-bit numbers though.
:( Can someone else confirm the error. I just found the same in an IBM
System x3105:
pdl> p longlong(10)%longlong(5) # congruences fail in my pdl
74645504
pdl> p 600851475143%71 #perl gets it right
0
pdl> p longlong(600851475143)%longlong(71) #pdl gets it wrong
74711040
The lines above show that the problem is not my perl nor my
hardware, but my pdl.
Regards,
Luis
_______________________________________________
Perldl mailing list
Perldl@jach.hawaii.edu
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
_______________________________________________
Perldl mailing list
Perldl@jach.hawaii.edu
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl