Giter Club home page Giter Club logo

Comments (4)

NotSqrt avatar NotSqrt commented on May 24, 2024

Is that due to this ?

printf/printf.c

Lines 322 to 326 in c235b5c

// TBD: for very large numbers switch back to native sprintf for exponentials. Anyone want to write code to replace this?
// Normal printf behavior is to print EVERY whole number digit which can be 100s of characters overflowing your buffers == bad
if (value > thres_max) {
return 0U;
}

This is the only missing feature I found compared to xprintfc (which is a bit smaller but not compliant with the standard, and not really tested).
They use this code to handle floats : https://github.com/MarioViara/xprintfc/blob/8f07c7c0d76370cdb44dbaee81f1f4201b1e7561/src/xformatc.c#L773
and their tests use printf("Floating > 32 bit %f",pow(2.0,32.0)+1.0);

from printf.

mpaland avatar mpaland commented on May 24, 2024

I think, FP support is not completely and satisfying implemented by now. Exponential representation is missing, too.
I didn't support the double type in the fist way, just because it's not so common in embedded systems and you can always cast a float down to a double.

from printf.

ckormanyos avatar ckormanyos commented on May 24, 2024

Have you seen this? https://github.com/ulfjack/ryu
It seems like it might still be experimental for C, but looks very promising...

from printf.

mpaland avatar mpaland commented on May 24, 2024

This is closed by 4.0.0

from printf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.