<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/dc/bcode.c, branch upstream/13.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=upstream%2F13.1.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=upstream%2F13.1.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2018-09-19T07:08:27Z</updated>
<entry>
<title>Make dc(1) buildable.</title>
<updated>2018-09-19T07:08:27Z</updated>
<author>
<name>Jung-uk Kim</name>
<email>jkim@FreeBSD.org</email>
</author>
<published>2018-09-19T07:08:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ee4526c085c75e053e447baaedd9ee7920f08951'/>
<id>urn:sha1:ee4526c085c75e053e447baaedd9ee7920f08951</id>
<content type='text'>
</content>
</entry>
<entry>
<title>dc(1): fix modulo operations with fractional inputs</title>
<updated>2017-12-07T02:08:55Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2017-12-07T02:08:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0d119bab3801d3bdac9c5fc0d8e64536197b67bc'/>
<id>urn:sha1:0d119bab3801d3bdac9c5fc0d8e64536197b67bc</id>
<content type='text'>
Our dc(1) has never correctly calculated remainders with fractional inputs.
Both bmod and bdivmod seem to have copy/pasted code from bdiv, which results
in the remainder having the wrong output scale.

PR:		162495
Reported by:	anonymous
Reviewed by:	pfg
Differential Revision:	https://reviews.freebsd.org/D13390
</content>
</entry>
<entry>
<title>dc(1): fix input of non-decimal fractional numbers</title>
<updated>2017-12-05T04:22:35Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2017-12-05T04:22:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=95639a80efb8d691feabe83428703dea89b873a4'/>
<id>urn:sha1:95639a80efb8d691feabe83428703dea89b873a4</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>bc/dc/patch: make some use of reallocarray(3).</title>
<updated>2017-03-05T16:10:35Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-03-05T16:10:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=63433bc937051f84486b603e9803597db68f796b'/>
<id>urn:sha1:63433bc937051f84486b603e9803597db68f796b</id>
<content type='text'>
reallocarray(3) is a non portable extension from OpenBSD. Given that it is
already in FreeBSD, make easier future merges by adopting in some cases
where the code has some shared heritage with OpenBSD.

Obtained from:	OpenBSD
</content>
</entry>
<entry>
<title>dc(1): Introduce e command, equivalent to p, but writes to stderr</title>
<updated>2017-02-28T20:50:49Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-02-28T20:50:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=29dfec52946a038ba85cae45ed06ad28eacb13cc'/>
<id>urn:sha1:29dfec52946a038ba85cae45ed06ad28eacb13cc</id>
<content type='text'>
Obtained from:	OpenBSD
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>dc(1): Merge minor changes from OpenBSD.</title>
<updated>2017-02-26T22:17:06Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-02-26T22:17:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6ef0daee41ed4e6932af5716aab34417780037c2'/>
<id>urn:sha1:6ef0daee41ed4e6932af5716aab34417780037c2</id>
<content type='text'>
Prefer setvbuf() to setlinebuf() for portability.
Some style(9) and redundant tests for NULL.

These are only meant to ease up merging newer changes but we are skipping
changes done in order to accomodate OpenBSD's pledge support.

Obtained from:	OpenBSD
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Sync with OpenBSD.</title>
<updated>2014-04-16T23:14:05Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2014-04-16T23:14:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=be848c7a13013b0555c07bfe92892b5dd546163f'/>
<id>urn:sha1:be848c7a13013b0555c07bfe92892b5dd546163f</id>
<content type='text'>
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>- Use BN_set_negative() and BN_is_negative() instead of subtracting or</title>
<updated>2012-12-30T15:20:27Z</updated>
<author>
<name>Kevin Lo</name>
<email>kevlo@FreeBSD.org</email>
</author>
<published>2012-12-30T15:20:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c3761c3848a0c3785259c94cf718ba2cd210f0c6'/>
<id>urn:sha1:c3761c3848a0c3785259c94cf718ba2cd210f0c6</id>
<content type='text'>
  comparing to zero.
- Fix fractional number exponentiation, especially for negative exponents.

Obtained from:	OpenBSD
</content>
</entry>
<entry>
<title>- Fix an erroneous invocation of the editline.</title>
<updated>2012-03-15T01:43:44Z</updated>
<author>
<name>Kevin Lo</name>
<email>kevlo@FreeBSD.org</email>
</author>
<published>2012-03-15T01:43:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=741e1faf5c5c5f7699b65af53ddd717721769e17'/>
<id>urn:sha1:741e1faf5c5c5f7699b65af53ddd717721769e17</id>
<content type='text'>
- Fix wrong scaling in the bc.library.
- Let length(0.000) conform to what gnu bc does.

PR:	bin/159227
Submitted by:	AIDA Shinra &lt;shinra at j10n dot org&gt;
</content>
</entry>
<entry>
<title>- Axe out signal handling code, the shell will take care of this</title>
<updated>2010-06-10T10:28:38Z</updated>
<author>
<name>Gabor Kovesdan</name>
<email>gabor@FreeBSD.org</email>
</author>
<published>2010-06-10T10:28:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=07f9cfc4ff3890e7e35ed4bc2cc37cb228cb67ab'/>
<id>urn:sha1:07f9cfc4ff3890e7e35ed4bc2cc37cb228cb67ab</id>
<content type='text'>
Suggested by:	jilles
Approved by:	delphij (mentor)
</content>
</entry>
</feed>
