Ask Your Question

Why doesn't Sage return `True` for `e < 3`?

asked 2021-01-31 22:11:52 +0200

vdeangel gravatar image

updated 2021-02-01 02:23:22 +0200

slelievre gravatar image

I would like to know why Sage does not return True if I type e < 3 or False for pi > 4. Is there a way to have that as output?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-02-01 00:13:08 +0200

eric_g gravatar image

You have to enforce the check of the inequality by asking for a Boolean:

sage: bool(e<3)                                                                                    
sage: bool(pi>4)                                                                                   
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2021-01-31 22:11:52 +0200

Seen: 108 times

Last updated: Feb 01 '21