diff options
| -rw-r--r-- | doc/misc/calc.texi | 4 | ||||
| -rw-r--r-- | lisp/calc/calc-comb.el | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index baf46f71703..7bd060189c5 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi | |||
| @@ -19111,8 +19111,8 @@ the operation is left in symbolic form. | |||
| 19111 | @tindex lcm | 19111 | @tindex lcm |
| 19112 | The @kbd{k l} (@code{calc-lcm}) [@code{lcm}] command computes the | 19112 | The @kbd{k l} (@code{calc-lcm}) [@code{lcm}] command computes the |
| 19113 | Least Common Multiple of two integers or fractions. The product of | 19113 | Least Common Multiple of two integers or fractions. The product of |
| 19114 | the LCM and GCD of two numbers is equal to the product of the | 19114 | the LCM and GCD of two numbers is equal to the absolute value of the |
| 19115 | numbers. | 19115 | product of the numbers. |
| 19116 | 19116 | ||
| 19117 | @kindex k E | 19117 | @kindex k E |
| 19118 | @pindex calc-extended-gcd | 19118 | @pindex calc-extended-gcd |
diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el index bc1ac315a01..c84ff236851 100644 --- a/lisp/calc/calc-comb.el +++ b/lisp/calc/calc-comb.el | |||
| @@ -260,7 +260,7 @@ | |||
| 260 | (defun calcFunc-lcm (a b) | 260 | (defun calcFunc-lcm (a b) |
| 261 | (let ((g (calcFunc-gcd a b))) | 261 | (let ((g (calcFunc-gcd a b))) |
| 262 | (if (Math-numberp g) | 262 | (if (Math-numberp g) |
| 263 | (math-div (math-mul a b) g) | 263 | (math-div (math-abs (math-mul a b)) g) |
| 264 | (list 'calcFunc-lcm a b)))) | 264 | (list 'calcFunc-lcm a b)))) |
| 265 | 265 | ||
| 266 | (defun calcFunc-egcd (a b) ; Knuth section 4.5.2 | 266 | (defun calcFunc-egcd (a b) ; Knuth section 4.5.2 |