On beyond Uint64's?

I have a silly question... is there any way for a Arduino microcontroller to handle numbers larger than the 64-bit limit that is currently imposed?

That is, do you know of anyone who has come up with a method to store 72, 80, or even 128-bit numbers?

It is perfectly possible to work with bigger numbers. That is, if you can work with them :wink:

A 128-bit number is just 2 64-bit numbers strung together.

There is no native code in the Arduino to do it for you, so you will have to work out your own routines for doing things with the numbers, but yes, it is perfectly possible.

However, the reason why there is no native code written is that it's pretty pointless.

At that kind of scale of number the lower-order digits become less and less meaningful. So, people just work with engineering notation - 3.873e+14 for example. (387300000000000) and that kind of thing can be stored in a float quite happily.

32 bit floats aren't much use if you're a nuclear physicist, working on Planck-scale values

Thank you both.

The reason I'd like to be working with numbers this large is for the purpose of a self-calibrating ADC routine that requires a quadratic equation to be solved.

The ADC puts out 16-bit results, makes for very large numbers, especially if the aim is to solve for a range that encompasses the range of the ADC values. Sum_X^4 of the largest possible ADC value (2^16) is a big number.

I tried right-shifting them by 5 digits allows the uint 64's to handle results such as sum_x^4 times sum_x^2. Trouble is, the results are off because the input numbers are no longer nearly as accurate once they have been right-shifted 5 digits (i.e. divided by 2^5).

What workarounds do you suggest for tackling issues such as the very large numbers created by sum_x^4 times sum_x^2 times yet another factor?

AWOL:
32 bit floats aren't much use if you're a nuclear physicist, working on Planck-scale values

You wouldn't be using an Arduino then :stuck_out_tongue:

At the very least you'd be using a PS2's Emotion Engine :wink:

You're not suggesting nuclear physicists don't use Arduinos, I hope.

AWOL:
You're not suggesting nuclear physicists don't use Arduinos, I hope.

No, they use the ChipKit ]:smiley:

OK, so in other words, I'm better off avoiding the computation of the quadratic equation on the Atmel, do it offline instead.

That's what I had resigned myself to do, though I still have the reference resistors on the PCB to allow these sorts of offline calculations to happen.

The Atmel simply looks at the reference results to see if they are where they should be and then flags results if the reference results are off.

If the reference resistor results are OK, then the ADC thermistor results are presumably OK also.