LISP sine function error

lgxavier
edited February 2022 in LISP
Please,
Does anyone know what might be happening with the sine function, both in LISP routines and on the command line.
Tangent and cosine ok, sine error, for any value. For example:
: (tan 0.785)
0.999203990105043
: (cos 0.785)
0.7073882691672
: (sin 0.785)
; ----- Error around expression -----
; (SIN 0.785)
;
"no function definition ; expected FUNCTION at [eval]"

In advance, thank you
Luiz,
Ultimate V22.1.06 and 07

Comments

  • SIN works for me.
    (sin 0.785)
    0.706825181105366
    I would suggest checking your code to check that SIN isn't being used a variable. If I do this then I get the same error as you.
    : (setq SIN nil)
    nil
    : (sin 0.785)
    
    ; ----- Error around expression -----
    ; (SIN 0.785)
    ;
    ERROR: no function definition <SIN> ; expected FUNCTION at [eval]

    Regards,
    Jason Bourhill
    BricsCAD V22 Ultimate
    CAD Concepts
  • Exactly!

    Thanks!
  • Trying to avoid reserved words can be hard a couple of common ones are min & max, real, str, int