Commit Graph

7 Commits

Author SHA1 Message Date
Alan Somers
95639a80ef dc(1): fix input of non-decimal fractional numbers
Inputting fractional non-decimal numbers has never worked correctly in our
OpenBSD-derived dc(1). It truncates the input to a number of decimal places
equal to the number of hexadecimal (or whatever base) places given on the
input. That's unacceptable, because many numbers require more precision to
represent in base 10 than in their original bases.

Fix this bug by using as many decimal places as needed to represent the
input, up to the maximum of the global scale factor.

This has one mildly surprising side effect: the scale of a number entered in
non-decimal mode will no longer necessarily equal the number of hexadecimal
(or whatever base) places given on the input. I think that's an acceptable
behavior change, given that inputting fractional non-decimal numbers never
worked in the first place, and the man page doesn't specify whether trailing
zeros on the input should affect a number's scale.

PR:		206230
Reported by:	nibbana@gmx.us
Reviewed by:	pfg
Differential Revision:	https://reviews.freebsd.org/D13336
2017-12-05 04:22:35 +00:00
Baptiste Daroussin
3e11bd9e2a Convert to usr.bin/ to LIBADD
Reduce overlinking
2014-11-25 14:29:10 +00:00
Ed Schouten
0c66031ab1 Remove unneeded CFLAGS.
Such optimisations should not be performed in this Makefile. Also, uqs@
suggested they have no effect, because the checksum of the resulting
binary is unchanged.

Discussed with:	gabor, uqs
2011-11-07 09:42:22 +00:00
Gabor Kovesdan
12360c49dd - style.Makefile(5)
Submitted by:	uqs
Approved by:	delphij (mentor)
2010-02-03 19:12:27 +00:00
Xin LI
7ffc8ae56e Move USD documents from /usr/share/doc/papers to to /usr/share/doc/usd.
Reviewed by:	gabor
2010-01-22 23:19:48 +00:00
Xin LI
097d042584 Makefile cleanups:
o Enable building of USD
 o Remove commented out targets
 o Remove WARNS?=6 lines since it's the default

Reviewed by:	gabor
2010-01-21 17:46:14 +00:00
Gabor Kovesdan
fdf1f88bce Replace GNU bc/dc with BSDL versions ported from OpenBSD. They have a good
compatibility level with the GNU counterparts and have shown to be mature
enough. For now, the GNU versions aren't removed from the tree, just detached
from the build.

Sponsored by:		Google Summer of Code 2008
Portbuild run by:	erwin
Approved by:		delphij
2010-01-20 21:30:52 +00:00