Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why do computations with pi default to symbolic?

Hello, Sage community,

It is known fact that SageMath uses symbolic computations by default. For example,

sqrt(8)

returns 2*sqrt(2). But it is also known that this behavior can be easily changed using decimals, like in the following case:

sqrt(8.0)

which returns 2.82842712474619.

However, this technique doesn't seem to work with symbolic constants like pi and e. For example,

80 / pi

returns the expected 80/pi, but

80.0 / pi

returns 80.0000000000000/pi instead of the numerical value 25.4647908947033.

I was wondering why is this the case?

Thank in advance for your answers!

Why do computations with pi default to symbolic?

Hello, Sage community,

It is known fact that SageMath uses symbolic computations by default. For example,

sqrt(8)

returns 2*sqrt(2). But it is also known that this behavior can be easily changed using decimals, like in the following case:

sqrt(8.0)

which returns 2.82842712474619.

However, this technique doesn't seem to work with symbolic constants like pi and e. For example,

80 / pi

returns the expected 80/pi, but

80.0 / pi

returns 80.0000000000000/pi instead of the numerical value 25.4647908947033.

I was wondering why is this the case?case.

Thank in advance for your answers!

Why do computations with pi default to symbolic?

Hello, Sage community,

It is known fact that SageMath uses symbolic computations by default. For example,

sqrt(8)

returns 2*sqrt(2). But it is also known that this behavior can be easily changed using decimals, like in the following case:

sqrt(8.0)

which returns 2.82842712474619.

However, this technique doesn't seem to work with symbolic constants like pi and e. For example,

80 / pi

returns the expected 80/pi, but

80.0 / pi

returns 80.0000000000000/pi instead of the numerical value 25.4647908947033.

I was wondering why is this the case.

Thank Thanks in advance for your answers!