;; -*-theme-d-*-

;; Copyright (C) 2018 Tommi Höynälänmaa
;; Distributed under GNU Lesser General Public License version 3,
;; see file doc/LGPL-3.


(define-interface (standard-library posix-math)

  (import (standard-library core)
	  (standard-library math))

  ;; Bessel functions.

  (declare r-j0 (:simple-proc (<real>) <real> pure))
  (declare r-j1 (:simple-proc (<real>) <real> pure))
  (declare r-jn (:simple-proc (<integer> <real>) <real> pure))

  (declare r-y0 (:simple-proc (<real>) <real> pure))
  (declare r-y1 (:simple-proc (<real>) <real> pure))
  (declare r-yn (:simple-proc (<integer> <real>) <real> pure))

  (declare-method j0 (:simple-proc (<real-number>) <real> pure))
  (declare-method j0 (:simple-proc (<real>) <real> pure))
  (declare-method j0 (:simple-proc (<rational>) <real> pure))
  (declare-method j0 (:simple-proc (<integer>) <real> pure))

  (declare-method j1 (:simple-proc (<real-number>) <real> pure))
  (declare-method j1 (:simple-proc (<real>) <real> pure))
  (declare-method j1 (:simple-proc (<rational>) <real> pure))
  (declare-method j1 (:simple-proc (<integer>) <real> pure))

  (declare-method jn (:simple-proc (<integer> <real-number>) <real> pure))
  (declare-method jn (:simple-proc (<integer> <real>) <real> pure))
  (declare-method jn (:simple-proc (<integer> <rational>) <real> pure))
  (declare-method jn (:simple-proc (<integer> <integer>) <real> pure))

  (declare-method y0 (:simple-proc (<real-number>) <real> pure))
  (declare-method y0 (:simple-proc (<real>) <real> pure))
  (declare-method y0 (:simple-proc (<rational>) <real> pure))
  (declare-method y0 (:simple-proc (<integer>) <real> pure))

  (declare-method y1 (:simple-proc (<real-number>) <real> pure))
  (declare-method y1 (:simple-proc (<real>) <real> pure))
  (declare-method y1 (:simple-proc (<rational>) <real> pure))
  (declare-method y1 (:simple-proc (<integer>) <real> pure))

  (declare-method yn (:simple-proc (<integer> <real-number>) <real> pure))
  (declare-method yn (:simple-proc (<integer> <real>) <real> pure))
  (declare-method yn (:simple-proc (<integer> <rational>) <real> pure))
  (declare-method yn (:simple-proc (<integer> <integer>) <real> pure)))
