mentat-collective / emmy

The Emmy Computer Algebra System.

Home Page:https://emmy.mentat.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

state-advancer throws "Cannot mix BigInt and other types"

kloimhardt opened this issue · comments

The following example (taken from the SICM book) throws the error "TypeError: Cannot mix BigInt and other types, use explicit conversions"

(defn harmonic-state-derivative [m k]
   (Lagrangian->state-derivative (L-harmonic m k)))

(def up01 (up 1.0 (up 1.0 2.0) (up 3.0 4.0)))

(def harmonic-state-advancer
  (state-advancer harmonic-state-derivative 2.0 1.0))

(harmonic-state-advancer up01, 10.0, 1.0e-12)

To reproduce, clone the Emmy as ES6 Module repository, run shadow-cljs watch emmy-esm and open http://localhost:9000/barebones.html

Thank you! Would you mind pasting the error too?

When I open barebones.html in the browser, the error

TypeError: Cannot mix BigInt and other types, use explicit conversions

is shown on the screen.

Ah, that pesky one... okay thank you, I will track it down!!

Fixed by #134 and patched over at that repo by kloimhardt/emmy-module#1.