Last in this series: behavior of irem()

Richard B. Kreckel kreckel at thep.physik.uni-mainz.de
Tue Oct 1 16:16:29 CEST 2002


On Tue, 1 Oct 2002, Roberto Bagnara wrote:
> The function
>
>   numeric irem(const numeric &a, const numeric &b)
>
> prints "Division by zero." and exits when b is zero.
> As in all the other cases reported, this makes it
> more difficult to write robust software.  Of course,
> we can check b before calling irem() (and we are doing it)
> but this impedes performance for no reason, since the
> test on b must be re-done anyway in order to decide whether
> to print the error message and exit.

Thanks, I've fixed it.  The two signatures of iquo() were affected as
well, btw.

Regards
    -richy.
-- 
Richard B. Kreckel
<Richard.Kreckel at GiNaC.DE>
<http://www.ginac.de/~kreckel/>




More information about the GiNaC-list mailing list