;;; calc-math.el --- mathematical functions for Calc
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2015 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
(math-to-hms a 'rad))
(t a)))
-(defun math-to-radians-2 (a) ; [N N]
+(defun math-to-radians-2 (a &optional force-symbolic) ; [N N]
(cond ((eq (car-safe a) 'hms)
(math-from-hms a 'rad))
((memq calc-angle-mode '(deg hms))
- (if calc-symbolic-mode
+ (if (or calc-symbolic-mode force-symbolic)
(math-div (math-mul a '(var pi var-pi)) 180)
(math-mul a (math-pi-over-180))))
(t a)))
-(defun math-from-radians-2 (a) ; [N N]
+(defun math-from-radians-2 (a &optional force-symbolic) ; [N N]
(cond ((memq calc-angle-mode '(deg hms))
- (if calc-symbolic-mode
+ (if (or calc-symbolic-mode force-symbolic)
(math-div (math-mul 180 a) '(var pi var-pi))
(math-div a (math-pi-over-180))))
(t a)))
(if calc-infinite-mode
'(neg (var inf var-inf))
(math-reject-arg x "*Logarithm of zero")))
- (calc-symbolic-mode (signal 'inexact-result nil))
+ (calc-symbolic-mode (signal 'inexact-result nil))
((Math-numberp x)
(math-with-extra-prec 2
(let ((xf (math-float x)))
(provide 'calc-math)
-;; arch-tag: c7367e8e-d0b8-4f70-8577-2fb3f31dbb4c
;;; calc-math.el ends here