marcandrysco / Errol

Binary floating-point to decimal string conversion algorithm.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong result for DBL_MAX in errol0_dtoa

wateret opened this issue · comments

#include <stdio.h>
#include <float.h>
#include "errol.h"

int main() {
  char buffer[1024];
  double d = DBL_MAX;
  printf("%d\n%s\n", errol0_dtoa(d, buffer), buffer);
  return 0;
}

Result

309
0

May need the same fix that is applied in errol1_dtoa?