First time here? Check out the FAQ!

Ask Your Question
1

Can I change the MPFI default printing style ?

asked 2 years ago

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)
print(a)

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 2 years ago

tmonteil gravatar image

You can print the endpoints of the interval:

sage: print(a.endpoints())
(0.000000000000000, 1.00000000000000)
Preview: (hide)
link

Comments

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 ( 2 years ago )

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2 years ago

Seen: 151 times

Last updated: Feb 05 '23