r123603 - in /trunk/gcc/ada: uintp.adb uintp.ads
charlet@gcc.gnu.org
charlet@gcc.gnu.org
Fri Apr 6 09:28:00 GMT 2007
Author: charlet
Date: Fri Apr 6 10:28:33 2007
New Revision: 123603
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123603
Log:
2007-04-06 Thomas Quinot <quinot@adacore.com>
* uintp.ads, uintp.adb (UI_Div_Rem): New subprogram, extending previous
implementation of UI_Div.
(UI_Div): Reimplement as a call to UI_Div_Rem.
(UI_Rem): Take advantage of the fact that UI_Div_Rem provides the
remainder, avoiding the cost of a multiplication and a subtraction.
(UI_Modular_Inverse): Take advantage of the fact that UI_Div_Rem
provides both quotient and remainder in a single computation.
(UI_Modular_Exponentiation, UI_Modular_Inverse): New modular arithmetic
functions for uint.
(UI_Modular_Inverse): Add a note that the behaviour of this subprogram
is undefined if the given n is not inversible.
Modified:
trunk/gcc/ada/uintp.adb
trunk/gcc/ada/uintp.ads
More information about the Gcc-cvs
mailing list