Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

printf is broken

Name: Anonymous 2014-09-09 6:44

printf("%.7g", 123.0); prints just "123", without trailing 0. Such is the consistency of C/C++

Name: Anonymous 2014-09-09 17:39

Your brain is broken.

Name: Anonymous 2014-09-09 20:33

>>2

how would user know it was FPU number originally?

Name: Anonymous 2014-09-09 20:35

http://bootleggames.wikia.com/wiki/Multicarts
The copyright notices are usually removed from the games. With 1st generation games, the logo is sometimes removed as well.

Name: Anonymous 2014-09-09 22:35

>>1
Although g == f in Russia, g != f in most other parts of the world.

Name: Anonymous 2014-09-09 22:48

>>5

f = float
g = double

although most compilers pass both float and double args in 64-bit registers

Name: Anonymous 2014-09-10 2:06

>>5-6
ISO/IEC 9899:2011 §7.21.6.1
f,F A double argument representing a floating-point number is converted to
decimal notation in the style [−]ddd.ddd, where the number of digits after
the decimal-point character is equal to the precision specification. If the
precision is missing, it is taken as 6; if the precision is zero and the # flag is
not specified, no decimal-point character appears. If a decimal-point
character appears, at least one digit appears before it. The value is rounded to
the appropriate number of digits.


g,G A double argument representing a floating-point number is converted in
style f or e (or in style F or E in the case of a G conversion specifier),
depending on the value converted and the precision. Let P equal the
precision if nonzero, 6 if the precision is omitted, or 1 if the precision is zero.
Then, if a conversion with style E would have an exponent of X:
— if P > X ≥ −4, the conversion is with style f (or F) and precision
P − (X + 1).
— otherwise, the conversion is with style e (or E) and precision P − 1.
Finally, unless the # flag is used, any trailing zeros are removed from the
fractional portion of the result and the decimal-point character is removed if
there is no fractional portion remaining.
A double argument representing an infinity or NaN is converted in the style
of an f or F conversion specifier.

Name: Anonymous 2014-09-10 2:35

>>7

ISO/IEC 9899:2011 is broken

Name: Anonymous 2014-09-11 14:50

>>8
It's (almost?) the same for the ones before

Name: Anonymous 2016-07-17 1:47

g doesn't mean double, it means use the shortest possible representation.

Name: Anonymous 2016-07-17 7:42

check my double

Name: Anonymous 2016-07-17 12:39

>>10
Wrong asshole

Name: Anonymous 2016-07-17 16:41

>>12
That sounds painful.

Name: Anonymous 2016-07-18 19:45

>>12
You have multiple assholes?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List