Author Topic: "exp10" no function definition  (Read 1926 times)

0 Members and 1 Guest are viewing this topic.

Peter2

  • Swamp Rat
  • Posts: 653
"exp10" no function definition
« on: March 03, 2016, 02:03:35 PM »
Help files for 2011, 2014 and 2016 tell me:
Code: [Select]
exp10(real): Base-10 exponent of the number
My result is:
Code: [Select]
Befehl: (exp 2)
7.38906

Befehl: (exp10 2)
; Fehler: no function definition: EXP10

Befehl: (exp10 2.0)
; Fehler: no function definition: EXP10

Befehl: (exp10)
; Fehler: no function definition: EXP10

Befehl: (sin 2)
0.909297

Befehl: (exp 2)
7.38906

Befehl: (sqrt 7.38)
2.71662

Befehl: (cos 2)
-0.416147

Befehl: (log 2)
0.693147

Befehl: (exp10 2.0)
; Fehler: no function definition: EXP10

Befehl: (exp10 200.0)
; Fehler: no function definition: EXP10

Befehl: (exp10 0.01)
; Fehler: no function definition: EXP10
"exp10" was not found here at The Swamp, not in AutoCAD forums, not at AfraLisp, and only mentioned, not used at CadTutor

Help-file wrong?
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: "exp10" no function definition
« Reply #1 on: March 03, 2016, 02:15:56 PM »
exp10() is a function for use in formula fields.

expt is the AutoLISP function you are looking for:
Code - Auto/Visual Lisp: [Select]
  1. _$ (expt 10 2)
  2. 100

Peter2

  • Swamp Rat
  • Posts: 653
Re: "exp10" no function definition
« Reply #2 on: March 03, 2016, 02:21:16 PM »
exp10() is a function for use in formula fields....
Sorry - my (really) bad. Via search I found the help side, but ignored that it is related (only) to "cal"  :oops:
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: "exp10" no function definition
« Reply #3 on: March 03, 2016, 02:33:45 PM »
No worries!

Just for fun -

If the expt function didn't exist, you could also use exp in the following way:
Code - Auto/Visual Lisp: [Select]
  1. _$ (defun myexpt ( a b ) (exp (* b (log a))))
  2. MYEXPT
  3. _$ (myexpt 10 2)
  4. 100.0
« Last Edit: March 03, 2016, 02:38:19 PM by Lee Mac »