
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between Float and Double in Arduino
Float
- Floating point numbers are stored using 4 bytes (32 bits).
- Their max value can be 3.4028235E+38 and their min value can be -3.4028235E+38.
- They have a precision of about 6-7 decimal places.
Double
- While on several platforms, double has more precision than float. However, on most Arduino boards (Uno and many other ATmega boards), double has the same size as float. Arduino Due is an exception, wherein double has a size of 8 bytes (compared to 4 bytes of float).
- On the boards where double is stored using 8 bytes, the max value can be 1.7*10^308 and the min value can be -1.7*10^308. On the boards where double is stored using 4 bytes, the max and min values are equivalent to float.
- For the boards where double is stored using 8 bytes, the decimal precision is 14-15 places.
Advertisements