Changeset d5a95c in git


Ignore:
Timestamp:
Dec 17, 2007, 3:24:58 PM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
cb8700ab17f1237cdf8eb6f42df5ce02f3c49b3b
Parents:
0e9a73c8fb9c05ddae294ee2b9212dcd19efe8fb
Message:
*hannes: handle 1.234E7 inmpr_*


git-svn-id: file:///usr/local/Singular/svn/trunk@10467 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/mpr_complex.cc

    r0e9a73c rd5a95c  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: mpr_complex.cc,v 1.4 2006-10-11 15:57:00 Singular Exp $ */
     4/* $Id: mpr_complex.cc,v 1.5 2007-12-17 14:24:58 Singular Exp $ */
    55
    66/*
     
    8080void gmp_float::setFromStr( char * in )
    8181{
     82  BOOLEAN neg=false;
     83  if (*in == '-') { in++; neg=TRUE; }
     84  char *s;
     85  if ((s=strchr(in,'E')) !=NULL)
     86  {
     87    *s='e';
     88  }
     89
    8290  // gmp doesn't understand number which begin with "." -- it needs 0.
    8391  // so, insert the zero
     
    96104    mpf_set_str( t, in, 10 );
    97105  }
     106  if (neg)  mpf_neg( t, t );
    98107}
    99108
Note: See TracChangeset for help on using the changeset viewer.