Ask Your Question

Revision history [back]

Why pi is float at Mac, and expression elsewhere?

Mac OS X:

┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 6.5, Release Date: 2015-02-17                         │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
sage: pi
3.141592653589793
sage: type(pi)
<type 'float'>
sage: a = pi + e*4/5; a
5.316218116357029
sage: a = 1 + 4/5; a
9/5

Linux (x86_64):

┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 6.5, Release Date: 2015-02-17                         │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
sage: pi
pi
sage: type(pi)
<type 'sage.symbolic.expression.Expression'>
sage: a = pi + e*4/5; a
pi + 4/5*e
sage: a = 1 + 4/5; a
9/5
sage: