Author: kevlo
Date: Sun Apr  1 15:05:15 2012
New Revision: 233759
URL: http://svn.freebsd.org/changeset/base/233759

Log:
  MFC r233121:
  Repair function when used with large scales
  
  Submitted by: AIDA Shinra <shinra at j10n dot org>

Modified:
  stable/9/usr.bin/bc/bc.library
Directory Properties:
  stable/9/usr.bin/   (props changed)

Modified: stable/9/usr.bin/bc/bc.library
==============================================================================
--- stable/9/usr.bin/bc/bc.library      Sun Apr  1 09:38:22 2012        
(r233758)
+++ stable/9/usr.bin/bc/bc.library      Sun Apr  1 15:05:15 2012        
(r233759)
@@ -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-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to