0

This is probably a silly question, but I used Sage to solve a system of linear equations, and I got exact solutions, which involve a lot of linear combinations of e^a (a is a constant). I know Sage is for symbolic expressions, but in this particular case I honestly just want some Real values.

Is there a simple way to tell Sage to approximate these answers? Like a way to force converting e^a into a floating point number?

I'd appreciate any help.

1 Answers1

0

You can use the N function or numerical_approx function or numerical_approx method (they're aliases for each other) to get a decimal from an exact value.

sage: x = sqrt(2)
sage: x
sqrt(2)
sage: x.n()
1.41421356237310
Aplet123
  • 33,825
  • 1
  • 29
  • 55