mpaland/printf

%1.6e prints 10.000000e+00

igor-m opened this issue · 1 comments

Hi, with

printf_("%d degrees = %1.6e \n", i, tmp);

I get

169 degrees = 1.100000e+01                                                       
170 degrees = 10.000000e+00                                                      
171 degrees = 9.000000e+00 

Shouldn't it print "1.000000e+01" instead?

How are you setting the values of i and tmp?

I'm getting 1.000000e+01 with:

#include <stdio.h>
#include "printf.h"

void _putchar(char character) {  putchar(character); }

int main()
{
    float tmp = 10.0;
    printf_("%1.6e\n", tmp);
}