/[emacs]/emacs/lisp/calc/calc-units.el
ViewVC logotype

Diff of /emacs/lisp/calc/calc-units.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by jpb, Thu Jan 6 18:14:08 2005 UTC revision 1.14 by jpb, Tue Feb 15 19:27:17 2005 UTC
# Line 1241  Entries are (SYMBOL EXPR DOC-STRING TEMP Line 1241  Entries are (SYMBOL EXPR DOC-STRING TEMP
1241                (eq (nth 1 (nth 2 rad)) 'rad)                (eq (nth 1 (nth 2 rad)) 'rad)
1242                (list 'calcFunc-tan (nth 1 rad))))))                (list 'calcFunc-tan (nth 1 rad))))))
1243    
1244    (math-defsimplify calcFunc-sec
1245      (and math-simplifying-units
1246           (math-units-in-expr-p (nth 1 math-simplify-expr) nil)
1247           (let ((rad (math-simplify-units
1248                       (math-evaluate-expr
1249                        (math-to-standard-units (nth 1 math-simplify-expr) nil))))
1250                 (calc-angle-mode 'rad))
1251             (and (eq (car-safe rad) '*)
1252                  (math-realp (nth 1 rad))
1253                  (eq (car-safe (nth 2 rad)) 'var)
1254                  (eq (nth 1 (nth 2 rad)) 'rad)
1255                  (list 'calcFunc-sec (nth 1 rad))))))
1256    
1257    (math-defsimplify calcFunc-csc
1258      (and math-simplifying-units
1259           (math-units-in-expr-p (nth 1 math-simplify-expr) nil)
1260           (let ((rad (math-simplify-units
1261                       (math-evaluate-expr
1262                        (math-to-standard-units (nth 1 math-simplify-expr) nil))))
1263                 (calc-angle-mode 'rad))
1264             (and (eq (car-safe rad) '*)
1265                  (math-realp (nth 1 rad))
1266                  (eq (car-safe (nth 2 rad)) 'var)
1267                  (eq (nth 1 (nth 2 rad)) 'rad)
1268                  (list 'calcFunc-csc (nth 1 rad))))))
1269    
1270    (math-defsimplify calcFunc-cot
1271      (and math-simplifying-units
1272           (math-units-in-expr-p (nth 1 math-simplify-expr) nil)
1273           (let ((rad (math-simplify-units
1274                       (math-evaluate-expr
1275                        (math-to-standard-units (nth 1 math-simplify-expr) nil))))
1276                 (calc-angle-mode 'rad))
1277             (and (eq (car-safe rad) '*)
1278                  (math-realp (nth 1 rad))
1279                  (eq (car-safe (nth 2 rad)) 'var)
1280                  (eq (nth 1 (nth 2 rad)) 'rad)
1281                  (list 'calcFunc-cot (nth 1 rad))))))
1282    
1283    
1284  (defun math-remove-units (expr)  (defun math-remove-units (expr)
1285    (if (math-check-unit-name expr)    (if (math-check-unit-name expr)

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26