]> www.ginac.de Git - cln.git/commitdiff
* src/complex/transcendental/cl_C_expt_C.cc (expt): fix logic for
authorRichard Kreckel <kreckel@ginac.de>
Tue, 5 Sep 2000 12:40:30 +0000 (12:40 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Tue, 5 Sep 2000 12:40:30 +0000 (12:40 +0000)
          the 0^y cases.
        * inserted the missing ChangLog entry.  :-)

ChangeLog
src/complex/transcendental/cl_C_expt_C.cc

index b5501b8297f79057f71d7200bddd1f7f75d5d13a..b71d9433bedc5a0e3845a18847a40e6c388475de 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-09-05  Richard Kreckel  <kreckel@ginac.de>
+
+        * src/complex/transcendental/cl_C_expt_C.cc (expt): fix logic for
+          the 0^y cases.
+
 2000-08-30  Richard Kreckel  <kreckel@ginac.de>
 
         * include/cln/number.h, cl_number::_as_cl_private_thing(): removed.
 
 2000-08-29  Richard Kreckel  <kreckel@ginac.de>
 
-        * TODO: DESCRIBE NAMESPACE CHANGES HERE!!!
+        * */*: Pushed CLN into a namespace `cln'.  While doing so, the
+          following identifiers got their poor-man's namespace (i.e. the 
+          prefix `cl_') stripped off:
+          cl_catalanconst()        ->  catalanconst()
+          cl_compare()             ->  compare()
+          cl_cos_sin()             ->  cos_sin()
+          cl_cos_sin_t             ->  cos_sin_t
+          cl_cosh_sinh()           ->  cosh_sinh()
+          cl_cosh_sinh_t           ->  cosh_sinh_t
+          cl_decoded_dfloat        ->  decoded_dfloat
+          cl_decoded_ffloat        ->  decoded_ffloat
+          cl_decoded_float         ->  decoded_float
+          cl_decoded_lfloat        ->  decoded_lfloat
+          cl_decoded_sfloat        ->  decoded_sfloat
+          cl_default_float_format  ->  default_float_format
+          cl_default_print_flags   ->  default_print_flags
+          cl_default_random_state  ->  default_random_state
+          cl_double_approx()       ->  double_approx()
+          cl_equal()               ->  equal()
+          cl_equal_hashcode()      ->  equal_hashcode()
+          cl_eulerconst()          ->  eulerconst()
+          cl_find_modint_ring()    ->  find_modint_ring()
+          cl_find_univpoly_ring()  ->  find_univ_poly_ring()
+          cl_float_approx()        ->  float_approx
+          cl_float_format()        ->  float_format()
+          cl_float_format_t        ->  float_format_t
+          cl_free_hook()           ->  free_hook()
+          cl_hermite()             ->  hermite()
+          cl_laguerre()            ->  laguerre()
+          cl_legendre()            ->  legandre()
+          cl_malloc_hook()         ->  malloc_hook()
+          cl_pi()                  ->  pi()
+          cl_tschebychev()         ->  tschebychev()
+          cl_zeta()                ->  zeta()
+          NB: For functions these changes includes all signatures.
+        * include/*: moved to include/cln/*, stripped `cl_' off filenames.
+        * cln-config.in: new file.
 
 2000-08-26  Bruno Haible  <haible@clisp.cons.org>
 
index b1bf2ea4a8df126912ae6d0773926927c8f009ca..149d9a10708d0e4e342b4d0791f7de7d5126fca4 100644 (file)
@@ -6,7 +6,6 @@
 // Specification.
 #include "cln/complex.h"
 
-
 // Implementation.
 
 #include "cl_C.h"
@@ -180,17 +179,13 @@ const cl_N expt (const cl_N& x, const cl_N& y)
        }
        // allgemeiner Fall (z.B. y Float oder komplex):
        if (zerop(x)) { // x=0.0 ?
+               if (zerop(y))  // y=0.0?
+                       return expt_0(x); // Liefere 1
+               if (rationalp(realpart(y))) // Realteil von y >0 exakt.
+                       return 0;
                if (!plusp(realpart(y))) // Realteil von y <=0 ?
-                       { cl_error_division_by_0(); }
-               if (realp(x) && realp(y)) {
-                       DeclareType(cl_R,x);
-                       DeclareType(cl_R,y);
-                       var cl_R f = contagion(x,y);
-                       // ein Float, da sonst x = Fixnum 0 gewesen wäre
-                   {   DeclareType(cl_F,f);
-                       return cl_float(0,f); // 0.0
-                   }
-               } else {
+                       cl_error_division_by_0();
+               else {
                        var cl_R f = contagion(contagion(x),contagion(y));
                        // ein Float, da sonst x = Fixnum 0 gewesen wäre
                    {   DeclareType(cl_F,f);
@@ -199,23 +194,6 @@ const cl_N expt (const cl_N& x, const cl_N& y)
                    }
                }
        }
-       if (zerop(y)) { // y=0.0 ?
-               if (realp(x) && realp(y)) {
-                       DeclareType(cl_R,x);
-                       DeclareType(cl_R,y);
-                       var cl_R f = contagion(x,y);
-                       // ein Float, da sonst y = Fixnum 0 gewesen wäre
-                   {   DeclareType(cl_F,f);
-                       return cl_float(1,f);
-                   }
-               } else {
-                       var cl_R f = contagion(contagion(x),contagion(y));
-                       // ein Float, da sonst y = Fixnum 0 gewesen wäre
-                   {   DeclareType(cl_F,f);
-                       return complex_C(cl_float(1,f),cl_float(0,f));
-                   }
-               }
-       }
        return exp(log(x)*y);
 }