Re: Interpreter erroneously reading some numbers

new topic     » goto parent     » topic index » view thread      » older message » newer message
SDPringle said...

As long as your numbers don't exceed 2^55 you have nothing to worry about because your pointers are all multiples of 8.

It's a fairly low priority thing, but one I'd like to solve properly one day. Pointers aren't an issue, it's arbitrary literal values - and most executables are well below 1GB anyway! The 2^55 (2^53?) thing is a bit of a red herring as #8000000000000000 (2^63) is perfectly fine, on a 32-bit system using 64-bit floats, but #8000000000000001 is not. I think I can see a way to count digits and reconstruct 64-bit integers in the range 0..#FFFFFFFFFFFFFFFF, it is probably more that accurately crafting 80-bit floats using only 64-bit floats that may prove the tougher issue. Any kind of type check seems unlikely to help unless you have the actual value you were expecting (where from and held how though?) vs. the value you actually got, and as type checking routines only accept the one value, I believe that rules them out completely, or at least makes a standard function a more logical choice. Maybe reconstructing a string representation to see if it matches the program source is the only way it can be done.

All I am really saying here is that I too am interested in determining precisely when 53/64 bits of precision (not value) are exceeded. My interests may differ, but probably share some common ground.

Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu