Transcen.scm (scm-5f2) | : | Transcen.scm (scm-5f3) | ||
---|---|---|---|---|

;;;; "Transcen.scm", Complex transcendental functions for SCM. | ;;;; "Transcen.scm", Complex transcendental functions for SCM. | |||

;; Copyright (C) 1992, 1993, 1995, 1997, 2005, 2006 Free Software Foundation, In c. | ;; Copyright (C) 1992, 1993, 1995, 1997, 2005, 2006, 2018 Free Software Foundati on, Inc. | |||

;; | ;; | |||

;; This program is free software: you can redistribute it and/or modify | ;; This program is free software: you can redistribute it and/or modify | |||

;; it under the terms of the GNU Lesser General Public License as | ;; it under the terms of the GNU Lesser General Public License as | |||

;; published by the Free Software Foundation, either version 3 of the | ;; published by the Free Software Foundation, either version 3 of the | |||

;; License, or (at your option) any later version. | ;; License, or (at your option) any later version. | |||

;; | ;; | |||

;; This program is distributed in the hope that it will be useful, but | ;; This program is distributed in the hope that it will be useful, but | |||

;; WITHOUT ANY WARRANTY; without even the implied warranty of | ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |||

;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||

;; Lesser General Public License for more details. | ;; Lesser General Public License for more details. | |||

skipping to change at line 69 | skipping to change at line 69 | |||

(define $acos real-acos) | (define $acos real-acos) | |||

(define $atan real-atan) | (define $atan real-atan) | |||

(define $sinh real-sinh) | (define $sinh real-sinh) | |||

(define $cosh real-cosh) | (define $cosh real-cosh) | |||

(define $tanh real-tanh) | (define $tanh real-tanh) | |||

(define $asinh real-asinh) | (define $asinh real-asinh) | |||

(define $acosh real-acosh) | (define $acosh real-acosh) | |||

(define $atanh real-atanh))) | (define $atanh real-atanh))) | |||

(define (real-log base x) | ||||

(if (and (real? x) (not (negative? x)) (real? base) (positive? base)) | ||||

(/ (real-ln x) (real-ln base)) | ||||

(slib:error 'real-log base x))) | ||||

(define $pi (* 4 (real-atan 1))) | (define $pi (* 4 (real-atan 1))) | |||

(define pi $pi) | (define pi $pi) | |||

(define (pi* z) (* $pi z)) | (define (pi* z) (* $pi z)) | |||

(define (pi/ z) (/ $pi z)) | (define (pi/ z) (/ $pi z)) | |||

;;;; Complex functions | ;;;; Complex functions | |||

(define (exp z) | (define (exp z) | |||

(if (real? z) (real-exp z) | (if (real? z) (real-exp z) | |||

(make-polar (real-exp (real-part z)) (imag-part z)))) | (make-polar (real-exp (real-part z)) (imag-part z)))) | |||

End of changes. 2 change blocks. | ||||

1 lines changed or deleted | | 6 lines changed or added |