Ask Your Question

Can I change the MPFI default printing style ?

asked 2023-02-03 11:34:31 +0200

Jidoex gravatar image

Hi !

I'm using MPFI as an interval arithmetic tool for a research project. I was wondering if it was possible to change the default printing style from the "question" style to the "brackets" style.

For instance, I woul like to code:

a = RIF(0,1)

And have it printing "[0 .. 1]" instead of "1.?" .

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-02-05 09:24:35 +0200

tmonteil gravatar image

You can print the endpoints of the interval:

sage: print(a.endpoints())
(0.000000000000000, 1.00000000000000)
edit flag offensive delete link more


It becomes a problem when I try to print lists of MPFI. But I guess for this case I could use list of endpoints, that I convert back to mpfi, thanks for the trick

Jidoex gravatar imageJidoex ( 2023-02-06 15:58:44 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2023-02-03 11:33:19 +0200

Seen: 72 times

Last updated: Feb 05 '23