mpf_reldiff on (0,0)?

Vincent Lefevre vincent at vinc17.net
Mon Apr 24 17:23:44 CEST 2023


What is the expected behavior of mpf_reldiff on (0,0)?

The documentation is

 -- Function: void mpf_reldiff (mpf_t ROP, const mpf_t OP1, const mpf_t
          OP2)
     Compute the relative difference between OP1 and OP2 and store the
     result in ROP.  This is abs(OP1-OP2)/OP1.

but 0/0 does not make sense in MPF.

FYI, MPFR added mpfr_reldiff for compatibility with MPF, but it is
currently completely buggy on singular numbers. So I would like to
known more on MPF, where the case (0,0) may occur.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-discuss mailing list