]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove repeated call in exponentiation of rational numbers
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 27 Feb 2025 10:32:05 +0000 (11:32 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 6 Jun 2025 08:37:15 +0000 (10:37 +0200)
Code cleanup.

gcc/ada/ChangeLog:

* urealp.adb (UR_Exponentiate): Use local variable.

gcc/ada/urealp.adb

index 446a65664f98bd9c6698f55a3a6280e2642ae95f..3a9fddea60b5925a863f5ed502fa652335c7c93c 100644 (file)
@@ -818,7 +818,7 @@ package body Urealp is
          return Store_Ureal
                   ((Num      => Uint_1,
                     Den      => -N,
-                    Rbase    => UI_To_Int (UR_Trunc (Bas)),
+                    Rbase    => UI_To_Int (IBas),
                     Negative => Neg));
 
       --  If the exponent is negative then we raise the numerator and the