The code to plot a surface using parametric_plot_3d
:
var("u,v")
parametric_plot3d([sqrt(u + I*v).real(), sqrt(u + I*v)^0.5.imag(),v],(u,-1,1), (v,-1,1))
The full list of the error is quite long so, I am list here parts of it. The first few lines are as follows:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-1ba937f0390c> in <module>
1 var("u,v")
----> 2 parametric_plot3d([sqrt(u + I*v).real(), sqrt(u + I*v)**RealNumber('0.5').imag(),v],(u,-Integer(1),Integer(1)), (v,-Integer(1),Integer(1)))
/usr/lib/python3/dist-packages/sage/misc/decorators.py in wrapper(*args, **kwds)
651 kwds[new_name] = kwds[old_name]
652 del kwds[old_name]
--> 653 return func(*args, **kwds)
654
655 return wrapper
.......
.......
The last few lines are:
/usr/lib/python3/dist-packages/sage/rings/number_field/number_field_element.pyx in sage.rings.number_field.number_field_element.NumberFieldElement.__float__ (build/cythonized/sage/rings/number_field/number_field_element.cpp:19026)()
1889 if c.imag == 0:
1890 return c.real
-> 1891 raise TypeError('unable to coerce to a real number')
1892
1893 def _complex_double_(self, CDF):
TypeError: unable to coerce to a real number