Skip to content

Instantly share code, notes, and snippets.

@perlpilot
Last active August 29, 2015 14:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save perlpilot/3777ffd262f82be0ba9e to your computer and use it in GitHub Desktop.
➤ ./symbolic --x='Vx*t+Px' --y='Vy*t+Py' --z='Vz*t+Pz' 't²=x²+y²+z²' t
t=(-(2*Vx*Px+2*Vy*Py+2*Vz*Pz)±√((2*Vx*Px+2*Vy*Py+2*Vz*Pz)²-4*(Vx²+Vy²+Vz²+-1)*(Px²+Py²+Pz²)))/(2*(Vx²+Vy²+Vz²+-1))
real 0m15.253s
user 0m15.050s
sys 0m0.189s
➤ ./symbolic "2²"
4
real 0m4.649s
user 0m4.513s
sys 0m0.129s
➤ perl6 --version
This is perl6 version 2014.10-141-g10aa8bf built on MoarVM version 2014.11-1-g33970c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment