Page 1 of 2
Arduino ESP8266 Math Precision - 32 or 64 bit?
Posted:
Mon Aug 01, 2016 6:03 pm
by tma
Greetings,
I noticed that the Serial.print statement does not support uint64_t variables. This has me wondering if the math package supports 64 bit calculations. I wonder if anyone here can enlighten me?
Thanks in advance for any help!
Re: Arduino ESP8266 Math Precision - 32 or 64 bit?
Posted:
Mon Aug 01, 2016 9:27 pm
by martinayotte
Same answer as the other thread l
I don't understand your question ...
Serial.print() is character based function.
Why it should be aware of uint64_t ?
Post your guilty code so that we can figure out ...
Re: Arduino ESP8266 Math Precision - 32 or 64 bit?
Posted:
Wed Aug 03, 2016 3:00 pm
by tma
Greetings,
Thanks for your interest!
I understand Serial.println() prints ASCII characters but it automatically does the conversion for uint32_t, 32 bit integers. Since my post I noticed a posting of an alternate println library function that apparently will handle 64 bit integers.
You have me thinking that I should try an itoa conversion to a char array and then print the result. I am not sure if the itoa function works for 64 bit integers - possibly that is the problem.
BTW I would like to delete my other similar post under general discussions but do not know how to do that.
Thanks again!
Re: Arduino ESP8266 Math Precision - 32 or 64 bit?
Posted:
Wed Aug 03, 2016 3:11 pm
by martinayotte
If you mean using "size_t println(unsigned long, int = DEC);", then there is no needs for something else.
But about your original question about uint64_t, did it failed to compile or not ?