Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math JS error for FPCore input. #155

Open
zaneenders opened this issue Oct 31, 2024 · 1 comment
Open

Math JS error for FPCore input. #155

zaneenders opened this issue Oct 31, 2024 · 1 comment

Comments

@zaneenders
Copy link
Contributor

zaneenders commented Oct 31, 2024

Getting an error for the following FPCore.
Screenshot 2024-10-31 at 9 57 55 AM

(FPCore (a b angle x-scale y-scale)
  (let* ([θ (* (/ angle 180) PI)]
         [F (* (* b a) (* b (- a)))]
         [A (/ (/ (+ (pow (* a (sin θ)) 2) (pow (* b (cos θ)) 2))
                x-scale) x-scale)]
         [B (/ (/ (* (* (* 2 (- (pow b 2) (pow a 2))) (sin θ)) (cos θ))
                x-scale) y-scale)]
         [C (/ (/ (+ (pow (* a (cos θ)) 2) (pow (* b (sin θ)) 2))
                y-scale) y-scale)])
        (- (* B B) (* (* 4 A) C))))
@zaneenders zaneenders self-assigned this Oct 31, 2024
@elmisback
Copy link
Collaborator

So this is being handled in a weird way where it's casting the FPCore to MathJS and then back to FPCore to get the variable names. We should just save the FPCore and stick to using that if it's available. In general, we should shift things toward using FPCore as the primary internal representation for Odyssey.

@zaneenders zaneenders removed their assignment Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants