Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
fd8eab36
Commit
fd8eab36
authored
Jul 07, 2007
by
Jay Belanger
Browse files
(math-approx-pi,math-approx-sqrt-e,math-approx-gamma-const):
Add docstrings.
parent
4b4b19bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
lisp/calc/calc-ext.el
lisp/calc/calc-ext.el
+8
-4
No files found.
lisp/calc/calc-ext.el
View file @
fd8eab36
...
...
@@ -1925,9 +1925,11 @@ calc-kill calc-kill-region calc-yank))))
(
put
'math-defcache
'lisp-indent-hook
2
)
;;; Betcha didn't know that pi = 16 atan(1/5) - 4 atan(1/239). [F] [Public]
(
defconst
math-approx-pi
(
defconst
math-approx-pi
(
eval-when-compile
(
math-read-number-simple
"3.141592653589793238463"
)))
(
math-read-number-simple
"3.141592653589793238463"
))
"An approximation for pi."
)
(
math-defcache
math-pi
math-approx-pi
(
math-add-float
(
math-mul-float
'
(
float
16
0
)
(
math-arctan-raw
'
(
float
2
-1
)))
...
...
@@ -1960,7 +1962,8 @@ calc-kill calc-kill-region calc-yank))))
(
math-sqrt-float
(
math-two-pi
)))
(
defconst
math-approx-sqrt-e
(
eval-when-compile
(
math-read-number-simple
"1.648721270700128146849"
)))
(
eval-when-compile
(
math-read-number-simple
"1.648721270700128146849"
))
"An approximation for sqrt(3)."
)
(
math-defcache
math-sqrt-e
math-approx-sqrt-e
(
math-add-float
'
(
float
1
0
)
(
math-exp-minus-1-raw
'
(
float
5
-1
))))
...
...
@@ -1975,7 +1978,8 @@ calc-kill calc-kill-region calc-yank))))
(
defconst
math-approx-gamma-const
(
eval-when-compile
(
math-read-number-simple
"0.5772156649015328606065120900824024310421593359399235988057672348848677267776646709369470632917467495"
)))
"0.5772156649015328606065120900824024310421593359399235988057672348848677267776646709369470632917467495"
))
"An approximation for gamma."
)
(
math-defcache
math-gamma-const
nil
math-approx-gamma-const
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment