ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 13 Jan 2014 11:54:00 +0100What does "Runtime Error: ECL says: ... is not of type FIXNUM" mean and how to fix it?https://ask.sagemath.org/question/10908/what-does-runtime-error-ecl-says-is-not-of-type-fixnum-mean-and-how-to-fix-it/I am trying to integrate $x(0.6x^{0.5}+0.6)$ from $0$ to 1.
Here's what I tried:
var('x')
(x*(0.6*x^0.5+0.6)).integrate(x,0,1)
But I received the following error:
RuntimeError: ECL says: 3.0 is not of type FIXNUM.
What does the error mean (I am especially curious where the 3 came from) and what can I do to correctly evaluate the definite integral? According to Wolfram Alpha, the answer is 0.54.Mon, 13 Jan 2014 10:42:37 +0100https://ask.sagemath.org/question/10908/what-does-runtime-error-ecl-says-is-not-of-type-fixnum-mean-and-how-to-fix-it/Answer by kcrisman for <p>I am trying to integrate $x(0.6x^{0.5}+0.6)$ from $0$ to 1.</p>
<p>Here's what I tried:</p>
<pre><code>var('x')
(x*(0.6*x^0.5+0.6)).integrate(x,0,1)
</code></pre>
<p>But I received the following error:</p>
<pre><code>RuntimeError: ECL says: 3.0 is not of type FIXNUM.
</code></pre>
<p>What does the error mean (I am especially curious where the 3 came from) and what can I do to correctly evaluate the definite integral? According to Wolfram Alpha, the answer is 0.54.</p>
https://ask.sagemath.org/question/10908/what-does-runtime-error-ecl-says-is-not-of-type-fixnum-mean-and-how-to-fix-it/?answer=15914#post-id-15914This doesn't fix the underlying issue that Maxima really doesn't like floating point exponents for some reason (see [here](http://sourceforge.net/p/maxima/bugs/2510/) for a related issue), but since you probably mean exact precision with your exponent here, try this:
sage: (x*(0.6*x^(1/2)+0.6)).integrate(x,0,1)
0.54
The underlying question is whether `x^0.5` or `x` to any decimal power (as a "floating point" object) is really the same as `x^(1/2)`, and if it isn't, then what the heck does it mean? These are subtle questions that different systems handle differently.Mon, 13 Jan 2014 11:54:00 +0100https://ask.sagemath.org/question/10908/what-does-runtime-error-ecl-says-is-not-of-type-fixnum-mean-and-how-to-fix-it/?answer=15914#post-id-15914