Message info
 
To:src-committers@freebsd.org From:Kevin Lo Subject:svn commit: r233121 - head/usr.bin/bc Date:Sun, 18 Mar 2012 15:34:39 +0000 (UTC)
 

Author: kevlo
Date: Sun Mar 18 15:34:39 2012
New Revision: 233121
URL: http://svn.freebsd.org/changeset/base/233121

Log:
Repair function when used with large scales

Submitted by: AIDA Shinra <shinra at j10n dot org>

Modified:
head/usr.bin/bc/bc.library

Modified: head/usr.bin/bc/bc.library
==============================================================================
--- head/usr.bin/bc/bc.library Sun Mar 18 15:03:02 2012 (r233120)
+++ head/usr.bin/bc/bc.library Sun Mar 18 15:34:39 2012 (r233121)
@@ -48,7 +48,7 @@ define e(x) {
t = scale
scale = 0
if (x > 0) scale = (0.435*x)/1
- scale = scale + t + 1
+ scale = scale + t + length(scale + t) + 1

w = 0
if (x < 0) {
@@ -120,7 +120,8 @@ define l(x) {
f = f*2
}

- scale = t + length(f) + length(t + length(f)) + 1
+ scale = 0
+ scale = t + length(f) + length((1.05*(t+length(f))/1)) + 1
u = (x - 1)/(x + 1)
s = u*u
scale = t + 2
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"