~ubuntu-branches/ubuntu/precise/gcalctool/precise-proposed

« back to all changes in this revision

Viewing changes to src/mp.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-07-11 21:41:18 UTC
  • mfrom: (1.3.25 upstream)
  • Revision ID: james.westby@ubuntu.com-20110711214118-q9tn33yxjw8eflzp
Tags: 6.1.3-0ubuntu1
* New upstream version
* debian/rules: drop the deprecated --with-gtk

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 * license.
10
10
 */
11
11
 
12
 
#ifdef HAVE_CONFIG_H
13
 
#include <config.h>
14
 
#endif
15
 
 
16
12
#include <stdlib.h>
17
13
#include <stdio.h>
18
14
#include <math.h>
990
986
{
991
987
    float r__1;
992
988
    int i, ix, xs, tss;
993
 
    float rx, rz, rlb;
 
989
    float rx, rz;
994
990
    MPNumber t1, t2;
995
991
 
996
992
    /* e^0 = 1 */
1005
1001
        return;
1006
1002
    }
1007
1003
 
1008
 
    /*  SEE IF ABS(X) SO LARGE THAT EXP(X) WILL CERTAINLY OVERFLOW
1009
 
     *  OR UNDERFLOW.  1.01 IS TO ALLOW FOR ERRORS IN ALOG.
1010
 
     */
1011
 
    rlb = log((float)MP_BASE) * 1.01f;
1012
 
 
1013
1004
    /* NOW SAFE TO CONVERT X TO REAL */
1014
1005
    rx = mp_cast_to_float(x);
1015
1006