Pārlūkot izejas kodu

The buffer for digits after the decimal-point is on the stack, so i think it's not a problem to make it slightly bigger.

https://forum.pjrc.com/threads/31233-float-and-double?p=86860&viewfull=1#post86860
teensy4-core
Frank pirms 9 gadiem
vecāks
revīzija
9074be84f0
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      teensy3/Print.cpp

+ 1
- 1
teensy3/Print.cpp Parādīt failu

@@ -295,7 +295,7 @@ size_t Print::printFloat(double number, uint8_t digits)

// Print the decimal point, but only if there are digits beyond
if (digits > 0) {
uint8_t n, buf[8], count=1;
uint8_t n, buf[16], count=1;
buf[0] = '.';

// Extract digits from the remainder one at a time

Notiek ielāde…
Atcelt
Saglabāt