The NetBSD Project

CVS log for src/lib/libc/gdtoa/hdtoa.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libc / gdtoa

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.12.2.1: download - view: text, markup, annotated - select for diffs
Thu Aug 22 19:59:46 2024 UTC (4 months, 3 weeks ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-1-RELEASE
Diff to: previous 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12: +8 -19 lines
Pull up following revision(s) (requested by riastradh in ticket #787):

	tests/lib/libc/stdio/t_printf.c: revision 1.17
	tests/lib/libc/stdio/t_printf.c: revision 1.18
	lib/libc/gdtoa/hdtoa.c: revision 1.13
	tests/lib/libc/stdio/t_printf.c: revision 1.11
	tests/lib/libc/stdio/t_printf.c: revision 1.12
	tests/lib/libc/stdio/t_printf.c: revision 1.13
	tests/lib/libc/stdio/t_printf.c: revision 1.14
	tests/lib/libc/stdio/t_printf.c: revision 1.15
	tests/lib/libc/stdio/t_printf.c: revision 1.16

tests/lib/libc/stdio/t_printf: Add a couple simple %La tests.

PR lib/56937: printf(3) long double %a formatting is broken
tests/lib/libc/stdio/t_printf: Fix %La test.
0xa.99ap+0 is closer to (long double)10.6 in x86 ld80 and in
binary128 (and possibly more formats, haven't verified).
tests/lib/libc/stdio/t_printf: Fix %a test the same way.
tests/lib/libc/stdio/t_printf: Add another %La test.

This one was adapted from the screw case shown in
https://mail-index.netbsd.org/tech-userlevel/2020/04/11/msg012329.html
which wasn't broken in our libc, but which nevertheless prompted us
to commit a wrong and apparently untested patch that has rendered
printf %La broken for the last four years, which is a little
embarrassing.  (The part of that patch that led to a buffer overrun
has been worked around, so now the output is just incorrect.)

PR lib/56937: printf(3) long double %a formatting is broken

Revert various broken changes to printf %La (hldtoa).
This reverts:
hdtoa.c 1.12 (PR/56247: Greg A. Woods: printf("%La", LDBL_MIN) dumps core)
hdtoa.c 1.11 (fix tyop)
hdtoa.c 1.10 (Via enh at google dot com in tech-userlevel. Fix handling of
    EXT_FRAC{H,L}BITS (although we don't need to since we don't have them).)

The underlying motivation for this change was that when ld128 is
decomposed into 4x32 words, this hldtoa logic is broken.

But we don't decompose ld128 into 4x32 words; we decompose it into
6x64 words.

And the change, which was supposed to be a noop in our case of 2x64
words (or similar for x87 80-bit floating-point), broke it to the
point of causing buffer overruns (PR 56247) which when worked around
led to just incorrect output output (PR 56937).
If we want to make the #ifdefs for 4x32 words work, that's fine, but
we absolutely must have automatic test cases to detect this kind of
regression because %La formatting is extremely important for
diagnosing details of floating-point data since it doesn't involve
rounding in binary formats.  For now I've added some trivial tests;
there is a more extensive test suite inside gdtoa that we need to
wire up before anyone tries any other shenanigans in this code.

PR lib/56937: printf(3) long double %a formatting is broken
tests/lib/libc/stdio/t_printf: Fix another rounding error.
Noted by kre.

This doesn't break a passing test or fix a failed test, at least on
x86 -- our printf produces `0x1.533p+3' for the double case and
`0xa.99ap+0' for the long double case.  But of the hexadecimal number
literals that that start with 0x5 having three hexadigits to the
right of the fractional point, 0x5.4cdp+1 closest to the IEEE 754
binary64, VAX D, x86 extended precision, and IEEE 754 binary128
floating-point numbers closest to 10.6.

The reason is that the number 10.6 (or the nearest floating-point
number in any format with enough precision) is:
101.0100 1100 1100|1100... * 2^1 = 0x5.4cc|c...p+1
If we round at the vertical bar to the _nearest_ output with three
hexadigits of precision, the result is:
101.0100 1100 1101 * 2^1 = 0x5.4cdp+1
tests/lib/libc/stdio/t_printf: Fix typo in ld128 case.
printf %La does not write the `L' suffix.
tests/lib/libc/stdio/t_printf: Fix sign error in ld128 case.

Also link back to where the test case came from.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Jun 9 15:06:07 2024 UTC (7 months ago) by jakllsch
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +15 -9 lines
Fix hdtoa() for VAX D floating point

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu May 9 12:24:24 2024 UTC (8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +8 -19 lines
Revert various broken changes to printf %La (hldtoa).

This reverts:

hdtoa.c 1.12 (PR/56247: Greg A. Woods: printf("%La", LDBL_MIN) dumps core)
hdtoa.c 1.11 (fix tyop)
hdtoa.c 1.10 (Via enh at google dot com in tech-userlevel. Fix handling of
    EXT_FRAC{H,L}BITS (although we don't need to since we don't have them).)

The underlying motivation for this change was that when ld128 is
decomposed into 4x32 words, this hldtoa logic is broken.

But we don't decompose ld128 into 4x32 words; we decompose it into
6x64 words.

And the change, which was supposed to be a noop in our case of 2x64
words (or similar for x87 80-bit floating-point), broke it to the
point of causing buffer overruns (PR 56247) which when worked around
led to just incorrect output output (PR 56937).

If we want to make the #ifdefs for 4x32 words work, that's fine, but
we absolutely must have automatic test cases to detect this kind of
regression because %La formatting is extremely important for
diagnosing details of floating-point data since it doesn't involve
rounding in binary formats.  For now I've added some trivial tests;
there is a more extensive test suite inside gdtoa that we need to
wire up before anyone tries any other shenanigans in this code.

PR lib/56937: printf(3) long double %a formatting is broken

Revision 1.12: download - view: text, markup, annotated - select for diffs
Tue Jun 15 10:56:52 2021 UTC (3 years, 7 months ago) by christos
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Branch point for: netbsd-10
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
PR/56247: Greg A. Woods: printf("%La", LDBL_MIN) dumps core
Don't write to ((char *)malloc(size))[-1];

Revision 1.9.42.1: download - view: text, markup, annotated - select for diffs
Tue Apr 21 18:41:59 2020 UTC (4 years, 8 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.9: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9: +18 -7 lines
Sync with HEAD

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Apr 11 20:48:53 2020 UTC (4 years, 9 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20200421, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -3 lines
fix tyop

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Apr 11 20:28:28 2020 UTC (4 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +18 -7 lines
Via enh at google dot com in tech-userlevel. Fix handling of
EXT_FRAC{H,L}BITS (although we don't need to since we don't have them).

Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Jul 4 11:46:41 2011 UTC (13 years, 6 months ago) by mrg
Branches: MAIN
CVS tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb8-mediatek-base, matt-nb8-mediatek, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, localcount-20160914, is-mlppp-base, is-mlppp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, agc-symver-base, agc-symver
Branch point for: phil-wifi
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -2 lines
avoid some uninitalised variable warnings.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Mar 21 23:37:42 2011 UTC (13 years, 9 months ago) by enami
Branches: MAIN
CVS tags: cherry-xenmp-base, cherry-xenmp
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +3 -3 lines
Don't use #endif where #else is expected.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Mar 21 22:33:46 2011 UTC (13 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +9 -2 lines
pacify lint.

Revision 1.5.2.3.2.1: download - view: text, markup, annotated - select for diffs
Tue Jun 3 20:47:07 2008 UTC (16 years, 7 months ago) by skrll
Branches: wrstuden-fixsa
Diff to: previous 1.5.2.3: preferred, colored; next MAIN 1.5.2.4: preferred, colored
Changes since revision 1.5.2.3: +6 -2 lines
Sync with netbsd-4.

Revision 1.5.2.3.4.1: download - view: text, markup, annotated - select for diffs
Tue Apr 8 21:10:55 2008 UTC (16 years, 9 months ago) by jdc
Branches: netbsd-4-0
CVS tags: netbsd-4-0-1-RELEASE
Diff to: previous 1.5.2.3: preferred, colored; next MAIN 1.5.2.4: preferred, colored
Changes since revision 1.5.2.3: +6 -2 lines
Pull up revisions:
  src/lib/libc/gdtoa/dmisc.c		1.4
  src/lib/libc/gdtoa/gdtoa.c		1.4
  src/lib/libc/gdtoa/gethex.c		1.4
  src/lib/libc/gdtoa/misc.c		1.4
  src/lib/libc/gdtoa/strtof_vaxf.c	1.4-1.5
  src/lib/libc/gdtoa/strtopQ.c		1.4
  src/lib/libc/gdtoa/strtopx.c		1.4
  src/lib/libc/gdtoa/strtopxL.c		1.4
  src/lib/libc/gdtoa/strtord.c		1.4
  src/lib/libc/gdtoa/dtoa.c		1.5
  src/lib/libc/gdtoa/strtod.c		1.5
  src/lib/libc/gdtoa/g_Qfmt.c		1.3
  src/lib/libc/gdtoa/g_xLfmt.c		1.3
  src/lib/libc/gdtoa/g_xfmt.c		1.3
  src/lib/libc/gdtoa/smisc.c		1.3
  src/lib/libc/gdtoa/strtof.c		1.3
  src/lib/libc/gdtoa/strtorQ.c		1.3
  src/lib/libc/gdtoa/strtorx.c		1.3
  src/lib/libc/gdtoa/strtorxL.c		1.3
  src/lib/libc/gdtoa/g_ddfmt.c		1.2
  src/lib/libc/gdtoa/g_dfmt.c		1.2
  src/lib/libc/gdtoa/g_ffmt.c		1.2
  src/lib/libc/gdtoa/strtoIQ.c		1.2
  src/lib/libc/gdtoa/strtoId.c		1.2
  src/lib/libc/gdtoa/strtoIdd.c		1.2
  src/lib/libc/gdtoa/strtoIf.c		1.2
  src/lib/libc/gdtoa/strtoIg.c		1.2
  src/lib/libc/gdtoa/strtoIx.c		1.2
  src/lib/libc/gdtoa/strtoIxL.c		1.2
  src/lib/libc/gdtoa/strtodI.c		1.2
  src/lib/libc/gdtoa/strtodnrp.c	1.2
  src/lib/libc/gdtoa/strtopd.c		1.2
  src/lib/libc/gdtoa/strtopdd.c		1.2
  src/lib/libc/gdtoa/strtopf.c		1.2
  src/lib/libc/gdtoa/strtordd.c		1.2
  src/lib/libc/gdtoa/strtorf.c		1.2
  src/lib/libc/gdtoa/sum.c		1.2
  src/lib/libc/gdtoa/gdtoa.h		1.8
  src/lib/libc/gdtoa/hdtoa.c		1.6
  src/lib/libc/gdtoa/strtodg.c		1.6
  src/lib/libc/stdio/vfwprintf.c	1.12
(requested by mjf ticket #1120).

Don't coredump on out of memory conditions. This solution leaks, but gdtoa
is too complicated to fix. Try printf %99999999999.9999999999f 2

Make this build again.

Revision 1.5.2.4: download - view: text, markup, annotated - select for diffs
Tue Apr 8 21:00:08 2008 UTC (16 years, 9 months ago) by jdc
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Diff to: previous 1.5.2.3: preferred, colored; branchpoint 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5.2.3: +6 -2 lines
Pull up revisions:
  src/lib/libc/gdtoa/dmisc.c		1.4
  src/lib/libc/gdtoa/gdtoa.c		1.4
  src/lib/libc/gdtoa/gethex.c		1.4
  src/lib/libc/gdtoa/misc.c		1.4
  src/lib/libc/gdtoa/strtof_vaxf.c	1.4-1.5
  src/lib/libc/gdtoa/strtopQ.c		1.4
  src/lib/libc/gdtoa/strtopx.c		1.4
  src/lib/libc/gdtoa/strtopxL.c		1.4
  src/lib/libc/gdtoa/strtord.c		1.4
  src/lib/libc/gdtoa/dtoa.c		1.5
  src/lib/libc/gdtoa/strtod.c		1.5
  src/lib/libc/gdtoa/g_Qfmt.c		1.3
  src/lib/libc/gdtoa/g_xLfmt.c		1.3
  src/lib/libc/gdtoa/g_xfmt.c		1.3
  src/lib/libc/gdtoa/smisc.c		1.3
  src/lib/libc/gdtoa/strtof.c		1.3
  src/lib/libc/gdtoa/strtorQ.c		1.3
  src/lib/libc/gdtoa/strtorx.c		1.3
  src/lib/libc/gdtoa/strtorxL.c		1.3
  src/lib/libc/gdtoa/g_ddfmt.c		1.2
  src/lib/libc/gdtoa/g_dfmt.c		1.2
  src/lib/libc/gdtoa/g_ffmt.c		1.2
  src/lib/libc/gdtoa/strtoIQ.c		1.2
  src/lib/libc/gdtoa/strtoId.c		1.2
  src/lib/libc/gdtoa/strtoIdd.c		1.2
  src/lib/libc/gdtoa/strtoIf.c		1.2
  src/lib/libc/gdtoa/strtoIg.c		1.2
  src/lib/libc/gdtoa/strtoIx.c		1.2
  src/lib/libc/gdtoa/strtoIxL.c		1.2
  src/lib/libc/gdtoa/strtodI.c		1.2
  src/lib/libc/gdtoa/strtodnrp.c	1.2
  src/lib/libc/gdtoa/strtopd.c		1.2
  src/lib/libc/gdtoa/strtopdd.c		1.2
  src/lib/libc/gdtoa/strtopf.c		1.2
  src/lib/libc/gdtoa/strtordd.c		1.2
  src/lib/libc/gdtoa/strtorf.c		1.2
  src/lib/libc/gdtoa/sum.c		1.2
  src/lib/libc/gdtoa/gdtoa.h		1.8
  src/lib/libc/gdtoa/hdtoa.c		1.6
  src/lib/libc/gdtoa/strtodg.c		1.6
  src/lib/libc/stdio/vfwprintf.c	1.12
(requested by mjf ticket #1120).

Don't coredump on out of memory conditions. This solution leaks, but gdtoa
is too complicated to fix. Try printf %99999999999.9999999999f 2

Make this build again.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Mar 21 23:13:48 2008 UTC (16 years, 9 months ago) by christos
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-premerge-20091211, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-premerge-20101231, matt-mips64-base2, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, christos-time_t-nbase, christos-time_t-base, christos-time_t, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +6 -2 lines
Don't coredump on out of memory conditions. This solution leaks, but gdtoa
is too complicated to fix. Try printf %99999999999.9999999999f 2

Revision 1.5.2.3: download - view: text, markup, annotated - select for diffs
Sat May 12 17:46:23 2007 UTC (17 years, 8 months ago) by snj
Branches: netbsd-4
CVS tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1
Branch point for: wrstuden-fixsa, netbsd-4-0
Diff to: previous 1.5.2.2: preferred, colored; branchpoint 1.5: preferred, colored
Changes since revision 1.5.2.2: +22 -2 lines
Pull up following revision(s) (requested by mhitch in ticket #646):
	lib/libc/gdtoa/hdtoa.c: revision 1.5
	sys/arch/vax/include/vaxfp.h: revision 1.6
deal with the vax in a slightly disgusting way.
Provide constants for the widths of the bitfields and use them.

Revision 1.5.2.2: download - view: text, markup, annotated - select for diffs
Mon May 7 19:49:06 2007 UTC (17 years, 8 months ago) by pavel
Branches: netbsd-4
Diff to: previous 1.5.2.1: preferred, colored; branchpoint 1.5: preferred, colored
Changes since revision 1.5.2.1: +339 -0 lines
Pull up following revision(s) (requested by manu in ticket #607):
	lib/libc/arch/i386/gen/isnanl.c: revision 1.6
	lib/libc/gdtoa/gdtoa.c: revision 1.2-1.3
	lib/libc/arch/x86_64/gen/isnanl.c: revision 1.6
	lib/libc/gdtoa/gdtoaimp.h: revision 1.6
	sys/arch/m68k/include/ieee.h: revision 1.13
	usr.bin/xlint/lint1/scan.l: revision 1.36-1.37
	lib/libc/stdio/snprintf_ss.c: revision 1.4
	lib/libc/arch/i386/gen/isfinitel.c: revision 1.2
	lib/libc/stdio/vfscanf.c: revision 1.38
	sys/arch/sparc/include/ieee.h: revision 1.11-1.12
	lib/libc/gdtoa/dtoa.c: revision 1.4
	lib/libc/stdio/Makefile.inc: revision 1.35
	lib/libc/stdio/fvwrite.c: revision 1.17
	lib/libc/arch/m68k/gen/fpclassifyl.c: revision 1.2
	lib/libc/arch/i386/gen/isinfl.c: revision 1.6
	lib/libc/arch/x86_64/gen/isinfl.c: revision 1.6
	lib/libc/arch/x86_64/gen/isfinitel.c: revision 1.2
	lib/libc/stdio/vfprintf.c: revision 1.55-1.57
	lib/libc/stdio/vsnprintf_ss.c: revision 1.3
	lib/libc/stdio/vfwprintf.c: revision 1.10
	sys/arch/x86/include/ieee.h: revision 1.10
	lib/libc/gdtoa/dmisc.c: revision 1.3
	lib/libc/gdtoa/Makefile.inc: revision 1.5
	sys/arch/hppa/include/ieee.h: revision 1.10
	lib/libc/arch/x86_64/gen/fpclassifyl.c: revision 1.3
	lib/libc/arch/i386/gen/fpclassifyl.c: revision 1.2
	sys/sys/ieee754.h: revision 1.7
	lib/libc/gdtoa/gdtoa.h: revision 1.7
	include/stdio.h: revision 1.67-1.68
	lib/libc/gdtoa/hdtoa.c: revision 1.1-1.4
	lib/libc/gdtoa/ldtoa.c: revision 1.1-1.4
defined(_NETBSD_SOURCE) is equivalent to (!defined(_ANSI_SOURCE) &&
!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)), so there's no
need to check both of them.
Fix for issue reported in PR lib/35401 as well as related overflow bugs.
deal with hex doubles.
Instead of abusing stdio to get a signal-safe version of sprintf, provide one.
remove __SAFE
add long double and hex double support from freebsd.
make this compile.
add new prototypes.
add the new files to the build. Note I am not bumping libc now, because
these are not used yet.
Merge the int bit with the high fraction bit. Add constants/macros
needed by gdtoa.
add constants used by gdtoa
since the int bit is merged, do the explicit math.
ext_int bit is no more.
ext_int bit is no more.
- merge change from freebsd
- add support for building as vfprintf.c
- XXX: we strdup to simplify the freeing logic. This should be fixed for
  efficiency in the vfprintf case.
use vfwprintf.c
enable wide doubles.
some int -> size_t
deal with sparc64 that has 112 bits of mantissa.
make extended precision gdtoa friendly.
int/size_t changes
make this gdtoa friendly.
remove dup definition
use dtoa() instead of returning empty when we don't have extended precision
information.
Fix previous, add forgotten pointer dereference in the call to dtoa().
Add a cheesy workaround marked XXX for the situation where the
strtod() implementation available in the environment does not
handle hex floats.
Discussed with and suggested by christos
From Christos:  gdtoa fixes for m68k.  M68k ports should build now, but
printing extended precision is a little off.
vax does not have <machine/ieee.h> or long double
It would be nice if the compiler provided something like __IEEE_MATH__
bring in FreeBSD's vfscanf() to gain multi-byte/collation support.
Unfortunately it is too difficult to make vfwscanf and this share
the same code like I did with printf, because for string parsing
the code is too different.

Revision 1.5.2.1
Mon Feb 26 01:29:25 2007 UTC (17 years, 10 months ago) by pavel
Branches: netbsd-4
FILE REMOVED
Changes since revision 1.5: +0 -359 lines
file hdtoa.c was added on branch netbsd-4 on 2007-05-07 19:49:06 +0000

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Feb 26 01:29:25 2007 UTC (17 years, 10 months ago) by christos
Branches: MAIN
CVS tags: matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: netbsd-4
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +22 -2 lines
deal with the vax in a slightly disgusting way.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Feb 23 17:45:59 2007 UTC (17 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -2 lines
vax does not have <machine/ieee.h> or long double
It would be nice if the compiler provided something like __IEEE_MATH__

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat Feb 3 18:09:20 2007 UTC (17 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -4 lines
int/size_t changes

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Feb 3 16:44:02 2007 UTC (17 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +15 -3 lines
some int -> size_t
deal with sparc64 that has 112 bits of mantissa.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Feb 2 23:03:35 2007 UTC (17 years, 11 months ago) by christos
Branches: MAIN
add long double and hex double support from freebsd.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>