generic.sls 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. ;;; Copyright © 2016 Federico Beffa
  2. ;;;
  3. ;;; This program is free software; you can redistribute it and/or modify it
  4. ;;; under the terms of the GNU General Public License as published by
  5. ;;; the Free Software Foundation; either version 3 of the License, or (at
  6. ;;; your option) any later version.
  7. ;;;
  8. ;;; This program is distributed in the hope that it will be useful, but
  9. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  10. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. ;;; GNU General Public License for more details.
  12. ;;;
  13. ;;; You should have received a copy of the GNU General Public License
  14. ;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. ;;; Code
  16. (library (scmutils generic)
  17. (export
  18. Sigma
  19. ;;;./scmutils/kernel/genenv.scm ; OK
  20. type type-predicate arity inexact? zero-like
  21. one-like identity-like zero? one? identity? negate invert
  22. square cube sqrt exp log exp2 exp10 log2 log10 sin cos tan
  23. cot sec csc asin acos sinh cosh tanh sech csch asinh acosh
  24. atanh abs determinant trace transpose dimension solve-linear
  25. derivative = < <= > >= + - * / dot-product cross-product
  26. outer-product expt gcd make-rectangular make-polar real-part
  27. imag-part magnitude angle conjugate atan partial-derivative
  28. partial apply arg-scale arg-shift sigma ref size compose
  29. ;;;./scmutils/poly/interp-generic ; OK
  30. Lagrange-interpolation-function
  31. ;;;./scmutils/poly/lagrange ; OK
  32. lagrange
  33. triangle-iterate
  34. make-linear-interpolator
  35. vector->vector-constructor
  36. ;;;./scmutils/units/hms-dms-radians
  37. degrees->radians radians->degrees xms->x x->xms dms->d d->dms dms->radians
  38. radians->dms hours->radians radians->hours hms->h h->hms
  39. hms->radians radians->hms
  40. ;;;./scmutils/units/convert.scm
  41. unit-convert
  42. ;;;./scmutils/mechanics/universal.scm ; OK
  43. D I D-as-matrix Taylor-series-coefficients
  44. )
  45. (import (except (rnrs base) error assert
  46. inexact? zero? sqrt exp log sin cos tan
  47. asin acos abs = < <= > >= + - * / expt gcd make-rectangular
  48. make-polar real-part imag-part magnitude angle
  49. atan apply)
  50. (rename (only (rnrs base) string<?) (string<? string:<?))
  51. (rnrs eval)
  52. (rnrs mutable-pairs)
  53. (rnrs io simple)
  54. (rnrs io ports)
  55. (rnrs r5rs)
  56. (rnrs conditions)
  57. (rnrs control)
  58. (rnrs syntax-case)
  59. (rename (except (rnrs lists) filter) (remq delq) (remv delv))
  60. (except (mit core) assert) ; assert is defined in general/logic-utils.scm
  61. (except (mit arithmetic) conjugate)
  62. (mit list)
  63. (mit curry)
  64. (except (mit arity) procedure-arity) ; use version in apply-hook
  65. (mit apply-hook)
  66. (mit hash-tables)
  67. (mit environment)
  68. (mit streams)
  69. (only (srfi :1) reduce reduce-right delete any every lset-adjoin
  70. make-list append-map)
  71. (srfi :9)
  72. (srfi :14) ; char-set
  73. (rename (srfi :41) (stream-cons cons-stream)
  74. (stream-fold stream-accumulate))
  75. (only (chezscheme) include import compile module eval-when
  76. last-pair environment? scheme-environment
  77. copy-environment interaction-environment
  78. make-parameter parameterize
  79. iota reverse! list-head random
  80. waiter-write console-output-port with-output-to-string
  81. void vector-copy)
  82. (scmutils base))
  83. (include "./scmutils/kernel/fbe2-genenv.scm")
  84. (include "./scmutils/poly/interp-generic.scm")
  85. (include "./scmutils/poly/lagrange.scm")
  86. (include "./scmutils/units/hms-dms-radians.scm")
  87. (include "./scmutils/units/convert.scm")
  88. ;;; **************************************
  89. (include "./scmutils/mechanics/universal.scm")
  90. (define (Sigma a b proc)
  91. (g:sigma proc a b))
  92. )