Version Check


In [ ]:
)version
)lisp cl-jupyter::+ispad-version+
)lisp cl-jupyter::*tmp-ispad*

Examples


In [ ]:
f(x) ==
  x>0 => 1
  x=0 => 0
  return -1

In [ ]:
f(12.344)

In [ ]:
f(0.0)

In [ ]:
f(-1/7)

In [ ]:
v:Vector(Integer):=[i^2 for i in 1..8]

In [ ]:
M:= matrix [v,2*v,3*v]

In [ ]:
L:=M*v

TeX Output


In [ ]:
)set output tex on

In [ ]:
M

In [ ]:
L

In [ ]:
I:=integrate(1/sqrt(1+x^4),x)

In [ ]:
D(I,x,2)

In [ ]:
function(%,G,x)

In [ ]:
integrate(G(z),z)

Compile Test


In [ ]:
)co ../spad/jupyter

In [ ]:
)show JUPY

jupyter.spad tests


In [ ]:
gnuDraw(G(x),x=-1..1,"gx.dat")

In [ ]:
)system gnuplot -e 'set term png' gx.dat > gx.png

In [ ]:
"gx.png"::FileName

In [ ]:
jDraw(sin(x)/x,x=0.1..12*%pi)

In [ ]:
)set output tex off
LDF ==> List DoubleFloat
X:=[i for i in 1..20]::LDF
Y:=[random 25 for i in 1..20]::LDF

In [ ]:
jDrawXY(X,Y)

In [ ]:
jDraw(besselJ(1,x)*cos(y),x=0..10,y=0..10)

The following file type can be inserted by converting them to FileName:

  • .html
  • .md
  • .js
  • .svg
  • .png

In [ ]:
"Flamingo.svg"::FileName

In [ ]:
jHtml  "<a href=_"http://www.w3schools.com/html/_">Visit our HTML tutorial</a>"

In [ ]:
jHtml "<table style=_"width:100%_"> _
  <tr> _
    <td>Jill</td> _
    <td>Smith</td> _
    <td>50</td> _
  </tr> _
  <tr> _
    <td>Eve</td> _
    <td>Jackson</td> _
    <td>94</td> _
  </tr> _
</table>"

In [ ]:
jHtml "<p>I will display &euro; and &#169; and &#174;</p>"

In [ ]:
jHtml "<p>This is <sub>subscripted</sub> text.</p>"

In [ ]:
jHtml "<form> _
  First name:<br> _
  <input type=_"text_" name=_"firstname_"> _
  <br> _
  Last name:<br> _
  <input type=_"text_" name=_"lastname_"> _
</form> "

In [ ]:
jHtml "<svg width=_"300_" height=_"200_"> <polygon points=_"100,10 40,198 190,78 10,78 160,198_" _
  style=_"fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;_"/> </svg>"

In [ ]:
jHtml  "<select name=_"cars_"> _
<option value=_"volvo_">Volvo</option> _
<option value=_"saab_">Saab</option> _
<option value=_"fiat_">Fiat</option> _
<option value=_"audi_">Audi</option> _
</select>"

In [ ]:
jHtml "$$-\frac{\hbar^2}{2m} \Delta\Psi+V(x)\,\Psi(x)=\ldots$$"

Error tests


In [ ]:
1/0

In [ ]:
besselI(1,23.3)

In [ ]: