Skip to content

printf() for %f is broken since one of the last merges #1

@LorenzMeier

Description

@LorenzMeier

Output of tests float:


nsh> tests float

--- SINGLE PRECISION TESTS ---
The single precision test involves calls to fabsf(),
if test fails check this function as well.

         success: sinf(0.0f) == 0.0f
         success: sinf(1.0f) == 0.84147f
         success: asinf(1.0f) == 1.57079f
         success: cosf(1.0f) == 0.54030f
         success: acosf(1.0f) == 0.0f
         success: sinf(0.1f) == 0.09983f
         success: sqrt(2.0f) == 1.41421f
         success: atan2f(1.0f, 1.0f) == 0.78539f
         FAIL: printf("%8.4f", 0.553415f) != "  0.5534", result:   0.0g34

--- DOUBLE PRECISION TESTS ---
         success: 1.0111 * 2.0 == 2.0222
         success: (float) 1.55f == 1.55 (double)
         success: sin(0.0) == 0.0
         success: sin(1.0) == 0.84147098480
         success: atan2(1.0, 1.0) == 0.785398
         testing pow() with magic value
           (44330.0 * (1.0 - pow((96286LL / 101325.0), 0.190295)));
         success: result: 0Z8.2293
         FAIL: printf("%8.4f", 0.553415) != "  0.5534", result:   0.0g34

 FAIL: One or more tests failed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions