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

Home » Public Forums » archive » Re: modulo reset
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: modulo reset [message #41702 is a reply to message #41700] Tue, 23 November 2004 07:52 Go to previous messageGo to previous message
Wayne Landsman is currently offline  Wayne Landsman
Messages: 117
Registered: January 1997
Senior Member
Ralf Schaa wrote:
> I'm reading out some binary data and the description says this about a
> data field :
>
> in the case of a modulo reset add 2^32
>
> What is this about? googling for "modulo reset" didn't get me far;
> I only imagine that I need some kind of overflow to get things fixed,
> but it is very unclear to me what is happening and why ...

Well, my first guess is that you are working with unsigned 32bit
integers which have a maximum value of 2^32-1, and then resets to zero.

STIS>print,2UL^31,2UL^32
2147483648 0

The easiest way to correct for this reset would be to use 64 bit integers

data = ulong64(datafield) + 2ULL^32

A less likely possiblity is that "modulo reset" refers to a 32bit
checksum, e.g. as implemented in
http://idlastro.gsfc.nasa.gov/ftp/pro/misc/checksum32.pro
which includes links to more documentation.

Good Luck, --Wayne Landsman
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Multitasking??
Next Topic: Multitasking??

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

Current Time: Sat Oct 11 12:36:43 PDT 2025

Total time taken to generate the page: 0.23927 seconds