Skip to main content
14 events
when toggle format what by license comment
Nov 30, 2018 at 3:00 history tweeted twitter.com/StackArduino/status/1068338984391245828
Nov 29, 2018 at 6:41 comment added Jot Thank you for the full sketch. I have added an answer. You have run into a very weird compiler bug that causes the 4294967295. Now I understand why my code did not show that number and your code does.
Nov 29, 2018 at 6:40 answer added Jot timeline score: 1
Nov 28, 2018 at 20:40 vote accept Coder_fox
Nov 28, 2018 at 20:36 answer added Edgar Bonet timeline score: 8
Nov 28, 2018 at 20:18 history edited Coder_fox CC BY-SA 4.0
added detailed sketch and description of the CPU
Nov 28, 2018 at 20:15 comment added Coder_fox @Jot No, everything is being run on a real arduino.
Nov 28, 2018 at 20:04 comment added Jot I tried to make a sketch myself, and I have different results. Please show your sketch and tell us the results of the sketch that you show. Are you running this in a simulator?
Nov 28, 2018 at 19:57 comment added Jot An integer can not be a 'nan', that is specified for floating point. Please update your question with board and microcontroller, and perhaps a full sketch.
Nov 28, 2018 at 19:55 history edited Coder_fox CC BY-SA 4.0
added 232 characters in body
Nov 28, 2018 at 19:54 comment added Coder_fox @Jot I used an Arduino nano with an Atmega 328p on board.
Nov 28, 2018 at 19:53 comment added Coder_fox @Jot This is an interesting point but why would a nan be replaced with 4294967295. Apparently they don't have the same binary value. Why did Atmel not include a nan value (that maybe could be disabled through fuses) in their processor architecture. This is a useful troubleshooting feature that is heavily used in all major programming languages.
Nov 28, 2018 at 19:48 comment added Jot I think the standard is that it is undefined for integer math. The floating point is according to the IEEE standard and returns a nan, but no exception. Catching an exeption in the Arduino is not possible (I think) : stackoverflow.com/questions/10095591/… When you find strange things with a byte, please give a full sketch that we can try and tell us which arduino board you use.
Nov 28, 2018 at 19:39 history asked Coder_fox CC BY-SA 4.0