mathlib-pchip.c
1 //! @file mathlib-pchip.c
2 //
3 //! @section copyright
4 //
5 // This file is part of VIF - vintage fortran compiler.
6 // Copyright 2020-2025 J. Marcel van der Veer <algol68g@xs4all.nl>.
7 //
8 //! @section license
9 //
10 // This program is free software; you can redistribute it and/or modify it
11 // under the terms of the gnu general public license as published by the
12 // free software foundation; either version 3 of the license, or
13 // (at your option) any later version.
14 //
15 // This program is distributed in the hope that it will be useful, but
16 // without any warranty; without even the implied warranty of merchantability
17 // or fitness for a particular purpose. See the GNU general public license for
18 // more details. you should have received a copy of the GNU general public
19 // license along with this program. If not, see <http://www.gnu.org/licenses/>.
20 //
21 //! @Synopsis
22 //
23 //! 41 subprograms from PCHIP
24
25 // Compiled from Fortran source code by VIF.
26 // Selected subprograms are:
27 //
28 // CHFCM DCHFDV DPCHCE DPCHDF DPCHIC DPCHSP PCHCE PCHDF PCHIA PCHKT
29 // CHFDV DCHFEV DPCHCI DPCHFD DPCHID DPCHST PCHCI PCHDOC PCHIC PCHSP
30 // CHFEV DCHFIE DPCHCM DPCHFE DPCHIM DPCHSW PCHCM PCHFD PCHID PCHST
31 // CHFIE DPCHBS DPCHCS DPCHIA DPCHKT PCHBS PCHCS PCHFE PCHIM PCHSW
32 // DCHFCM
33
34 // PCHIP routines from SLATEC.
35 //
36 // Source: netlib.org/slatec/
37
38 // The license for PCHIP Fortran source code is:
39 //
40 // The SLATEC Common Mathematical Library was developed at
41 // US government research laboratories and is in the public domain.
42 //
43 // Repository: http://www.netlib.org/slatec/
44 //
45 // The SLATEC common mathematical library is issued by the following
46 //
47 // Air Force Weapons Laboratory, Albuquerque
48 // Lawrence Livermore National Laboratory, Livermore
49 // Los Alamos National Laboratory, Los Alamos
50 // National Institute of Standards and Technology, Washington
51 // National Energy Research Supercomputer Center, Livermore
52 // Oak Ridge National Laboratory, Oak Ridge
53 // Sandia National Laboratories, Albuquerque
54 // Sandia National Laboratories, Livermore
55 //
56 // All questions concerning the distribution of the library should be
57 // directed to the NATIONAL ENERGY SOFTWARE CENTER, 9700 Cass Ave.,
58 // Argonne, Illinois 60439, and not to the authors of the subprograms.
59 //
60 // * * * * * Notice * * * * *
61 //
62 // This material was prepared as an account of work sponsored by the
63 // United States Government. Neither the United States, nor the
64 // Department of Energy, nor the Department of Defense, nor any of
65 // their employees, nor any of their contractors, subcontractors, or
66 // their employees, makes any warranty, expressed or implied, or
67 // assumes any legal liability or responsibility for the accuracy,
68 // completeness, or usefulness of any information, apparatus, product,
69 // or process disclosed, or represents that its use would not infringe
70 // upon privately owned rights.
71
72 /*
73 Generated by VIF - experimental VIntage Fortran compiler.
74 VIF release 1.1.7
75 */
139 static CALLS __calls[__ncalls] = {
140 {"chfcm", 0}, // integer*4 function
141 {"chfdv", 0}, // subroutine
142 {"chfev", 0}, // subroutine
143 {"chfie", 0}, // real*4 function
144 {"dchfcm", 0}, // integer*4 function
145 {"dchfdv", 0}, // subroutine
146 {"dchfev", 0}, // subroutine
147 {"dchfie", 0}, // real*8 function
148 {"dpchbs", 0}, // subroutine
149 {"dpchce", 0}, // subroutine
150 {"dpchci", 0}, // subroutine
151 {"dpchcm", 0}, // subroutine
152 {"dpchcs", 0}, // subroutine
153 {"dpchdf", 0}, // real*8 function
154 {"dpchfd", 0}, // subroutine
155 {"dpchfe", 0}, // subroutine
156 {"dpchia", 0}, // real*8 function
157 {"dpchic", 0}, // subroutine
158 {"dpchid", 0}, // real*8 function
159 {"dpchim", 0}, // subroutine
160 {"dpchkt", 0}, // subroutine
161 {"dpchsp", 0}, // subroutine
162 {"dpchst", 0}, // real*8 function
163 {"dpchsw", 0}, // subroutine
164 {"pchbs", 0}, // subroutine
165 {"pchce", 0}, // subroutine
166 {"pchci", 0}, // subroutine
167 {"pchcm", 0}, // subroutine
168 {"pchcs", 0}, // subroutine
169 {"pchdf", 0}, // real*4 function
170 {"pchdoc", 0}, // subroutine
171 {"pchfd", 0}, // subroutine
172 {"pchfe", 0}, // subroutine
173 {"pchia", 0}, // real*4 function
174 {"pchic", 0}, // subroutine
175 {"pchid", 0}, // real*4 function
176 {"pchim", 0}, // subroutine
177 {"pchkt", 0}, // subroutine
178 {"pchsp", 0}, // subroutine
179 {"pchst", 0}, // real*4 function
180 {"pchsw", 0}, // subroutine
181 {NULL, 0}
182 };
185 int_4 _p_ ne_, real_4 _p_ xe_, real_4 _p_ fe_, real_4 _p_ de_, int_4 _p_ next_, int_4 _p_ ierr_);
187 int_4 _p_ ne_, real_4 _p_ xe_, real_4 _p_ fe_, int_4 _p_ next_, int_4 _p_ ierr_);
189 , real_4 _p_ a_, real_4 _p_ b_);
192 , int_4 _p_ ne_, real_8 _p_ xe_, real_8 _p_ fe_, real_8 _p_ de_, int_4 _p_ next_, int_4 _p_ ierr_);
194 , int_4 _p_ ne_, real_8 _p_ xe_, real_8 _p_ fe_, int_4 _p_ next_, int_4 _p_ ierr_);
196 d2_, real_8 _p_ a_, real_8 _p_ b_);
198 , int_4 _p_ nknots_, real_8 _p_ t_, real_8 _p_ bcoef_, int_4 _p_ ndim_, int_4 _p_ kord_, int_4 _p_ ierr_);
200 real_8 _p_ d_, int_4 _p_ incfd_, int_4 _p_ ierr_);
203 skip_, int_4 _p_ ismon_, int_4 _p_ ierr_);
205 incfd_, int_4 _p_ ierr_);
208 skip_, int_4 _p_ ne_, real_8 _p_ xe_, real_8 _p_ fe_, real_8 _p_ de_, int_4 _p_ ierr_);
210 skip_, int_4 _p_ ne_, real_8 _p_ xe_, real_8 _p_ fe_, int_4 _p_ ierr_);
212 skip_, real_8 _p_ a_, real_8 _p_ b_, int_4 _p_ ierr_);
214 real_8 _p_ d_, int_4 _p_ incfd_, real_8 _p_ wk_, int_4 _p_ nwk_, int_4 _p_ ierr_);
216 skip_, int_4 _p_ ia_, int_4 _p_ ib_, int_4 _p_ ierr_);
220 int_4 _p_ incfd_, real_8 _p_ wk_, int_4 _p_ nwk_, int_4 _p_ ierr_);
223 _p_ slope_, int_4 _p_ ierr_);
225 int_4 _p_ nknots_, real_4 _p_ t_, real_4 _p_ bcoef_, int_4 _p_ ndim_, int_4 _p_ kord_, int_4 _p_ ierr_);
227 real_4 _p_ d_, int_4 _p_ incfd_, int_4 _p_ ierr_);
230 skip_, int_4 _p_ ismon_, int_4 _p_ ierr_);
232 incfd_, int_4 _p_ ierr_);
236 skip_, int_4 _p_ ne_, real_4 _p_ xe_, real_4 _p_ fe_, real_4 _p_ de_, int_4 _p_ ierr_);
238 skip_, int_4 _p_ ne_, real_4 _p_ xe_, real_4 _p_ fe_, int_4 _p_ ierr_);
240 skip_, real_4 _p_ a_, real_4 _p_ b_, int_4 _p_ ierr_);
242 real_4 _p_ d_, int_4 _p_ incfd_, real_4 _p_ wk_, int_4 _p_ nwk_, int_4 _p_ ierr_);
244 skip_, int_4 _p_ ia_, int_4 _p_ ib_, int_4 _p_ ierr_);
248 _p_ incfd_, real_4 _p_ wk_, int_4 _p_ nwk_, int_4 _p_ ierr_);
251 slope_, int_4 _p_ ierr_);
252 int_4 _chfcm (real_4 _p_ d1_, real_4 _p_ d2_, real_4 _p_ delta_)
253 { // ** body not listed **
355 }
356 int_4 _chfdv (real_4 _p_ x1_, real_4 _p_ x2_, real_4 _p_ f1_, real_4 _p_ f2_, real_4 _p_ d1_, real_4 _p_ d2_, int_4 _p_
357 ne_, real_4 _p_ xe_, real_4 _p_ fe_, real_4 _p_ de_, int_4 _p_ next_, int_4 _p_ ierr_)
358 { // ** body not listed **
414 }
415 int_4 _chfev (real_4 _p_ x1_, real_4 _p_ x2_, real_4 _p_ f1_, real_4 _p_ f2_, real_4 _p_ d1_, real_4 _p_ d2_, int_4 _p_
416 ne_, real_4 _p_ xe_, real_4 _p_ fe_, int_4 _p_ next_, int_4 _p_ ierr_)
417 { // ** body not listed **
470 }
471 real_4 _chfie (real_4 _p_ x1_, real_4 _p_ x2_, real_4 _p_ f1_, real_4 _p_ f2_, real_4 _p_ d1_, real_4 _p_ d2_, real_4
472 _p_ a_, real_4 _p_ b_)
473 { // ** body not listed **
552 }
553 int_4 _dchfcm (real_8 _p_ d1_, real_8 _p_ d2_, real_8 _p_ delta_)
554 { // ** body not listed **
656 }
657 int_4 _dchfdv (real_8 _p_ x1_, real_8 _p_ x2_, real_8 _p_ f1_, real_8 _p_ f2_, real_8 _p_ d1_, real_8 _p_ d2_, int_4
658 _p_ ne_, real_8 _p_ xe_, real_8 _p_ fe_, real_8 _p_ de_, int_4 _p_ next_, int_4 _p_ ierr_)
659 { // ** body not listed **
715 }
716 int_4 _dchfev (real_8 _p_ x1_, real_8 _p_ x2_, real_8 _p_ f1_, real_8 _p_ f2_, real_8 _p_ d1_, real_8 _p_ d2_, int_4
717 _p_ ne_, real_8 _p_ xe_, real_8 _p_ fe_, int_4 _p_ next_, int_4 _p_ ierr_)
718 { // ** body not listed **
771 }
772 real_8 _dchfie (real_8 _p_ x1_, real_8 _p_ x2_, real_8 _p_ f1_, real_8 _p_ f2_, real_8 _p_ d1_, real_8 _p_ d2_, real_8
773 _p_ a_, real_8 _p_ b_)
774 { // ** body not listed **
853 }
854 int_4 _dpchbs (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ f_, real_8 _p_ d_, int_4 _p_ incfd_, int_4 _p_ knotyp_, int_4
855 _p_ nknots_, real_8 _p_ t_, real_8 _p_ bcoef_, int_4 _p_ ndim_, int_4 _p_ kord_, int_4 _p_ ierr_)
856 { // ** body not listed **
893 }
894 int_4 _dpchce (int_4 _p_ ic_, real_8 _p_ vc_, int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ h_, real_8 _p_ slope_, real_8 _p_
895 d_, int_4 _p_ incfd_, int_4 _p_ ierr_)
896 { // ** body not listed **
1046 }
1047 int_4 _dpchci (int_4 _p_ n_, real_8 _p_ h_, real_8 _p_ slope_, real_8 _p_ d_, int_4 _p_ incfd_)
1048 { // ** body not listed **
1132 }
1133 int_4 _dpchcm (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ f_, real_8 _p_ d_, int_4 _p_ incfd_, logical_4 _p_ skip_, int_4
1134 _p_ ismon_, int_4 _p_ ierr_)
1135 { // ** body not listed **
1191 }
1192 int_4 _dpchcs (real_8 _p_ switch_, int_4 _p_ n_, real_8 _p_ h_, real_8 _p_ slope_, real_8 _p_ d_, int_4 _p_ incfd_,
1193 int_4 _p_ ierr_)
1194 { // ** body not listed **
1339 }
1340 real_8 _dpchdf (int_4 _p_ k_, real_8 _p_ x_, real_8 _p_ s_, int_4 _p_ ierr_)
1341 { // ** body not listed **
1379 }
1380 int_4 _dpchfd (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ f_, real_8 _p_ d_, int_4 _p_ incfd_, logical_4 _p_ skip_, int_4
1381 _p_ ne_, real_8 _p_ xe_, real_8 _p_ fe_, real_8 _p_ de_, int_4 _p_ ierr_)
1382 { // ** body not listed **
1499 }
1500 int_4 _dpchfe (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ f_, real_8 _p_ d_, int_4 _p_ incfd_, logical_4 _p_ skip_, int_4
1501 _p_ ne_, real_8 _p_ xe_, real_8 _p_ fe_, int_4 _p_ ierr_)
1502 { // ** body not listed **
1619 }
1620 real_8 _dpchia (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ f_, real_8 _p_ d_, int_4 _p_ incfd_, logical_4 _p_ skip_,
1621 real_8 _p_ a_, real_8 _p_ b_, int_4 _p_ ierr_)
1622 { // ** body not listed **
1737 }
1738 int_4 _dpchic (int_4 _p_ ic_, real_8 _p_ vc_, real_8 _p_ switch_, int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ f_, real_8
1739 _p_ d_, int_4 _p_ incfd_, real_8 _p_ wk_, int_4 _p_ nwk_, int_4 _p_ ierr_)
1740 { // ** body not listed **
1841 }
1842 real_8 _dpchid (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ f_, real_8 _p_ d_, int_4 _p_ incfd_, logical_4 _p_ skip_, int_4
1843 _p_ ia_, int_4 _p_ ib_, int_4 _p_ ierr_)
1844 { // ** body not listed **
1938 }
1939 int_4 _dpchim (int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ f_, real_8 _p_ d_, int_4 _p_ incfd_, int_4 _p_ ierr_)
1940 { // ** body not listed **
2074 }
2075 int_4 _dpchkt (int_4 _p_ n_, real_8 _p_ x_, int_4 _p_ knotyp_, real_8 _p_ t_)
2076 { // ** body not listed **
2104 }
2105 int_4 _dpchsp (int_4 _p_ ic_, real_8 _p_ vc_, int_4 _p_ n_, real_8 _p_ x_, real_8 _p_ f_, real_8 _p_ d_, int_4 _p_
2106 incfd_, real_8 _p_ wk_, int_4 _p_ nwk_, int_4 _p_ ierr_)
2107 { // ** body not listed **
2345 }
2346 real_8 _dpchst (real_8 _p_ arg1_, real_8 _p_ arg2_)
2347 { // ** body not listed **
2377 }
2378 int_4 _dpchsw (real_8 _p_ dfmax_, int_4 _p_ iextrm_, real_8 _p_ d1_, real_8 _p_ d2_, real_8 _p_ h_, real_8 _p_ slope_,
2379 int_4 _p_ ierr_)
2380 { // ** body not listed **
2514 }
2515 int_4 _pchbs (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ f_, real_4 _p_ d_, int_4 _p_ incfd_, int_4 _p_ knotyp_, int_4 _p_
2516 nknots_, real_4 _p_ t_, real_4 _p_ bcoef_, int_4 _p_ ndim_, int_4 _p_ kord_, int_4 _p_ ierr_)
2517 { // ** body not listed **
2554 }
2555 int_4 _pchce (int_4 _p_ ic_, real_4 _p_ vc_, int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ h_, real_4 _p_ slope_, real_4 _p_
2556 d_, int_4 _p_ incfd_, int_4 _p_ ierr_)
2557 { // ** body not listed **
2707 }
2708 int_4 _pchci (int_4 _p_ n_, real_4 _p_ h_, real_4 _p_ slope_, real_4 _p_ d_, int_4 _p_ incfd_)
2709 { // ** body not listed **
2793 }
2794 int_4 _pchcm (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ f_, real_4 _p_ d_, int_4 _p_ incfd_, logical_4 _p_ skip_, int_4
2795 _p_ ismon_, int_4 _p_ ierr_)
2796 { // ** body not listed **
2852 }
2853 int_4 _pchcs (real_4 _p_ switch_, int_4 _p_ n_, real_4 _p_ h_, real_4 _p_ slope_, real_4 _p_ d_, int_4 _p_ incfd_,
2854 int_4 _p_ ierr_)
2855 { // ** body not listed **
3000 }
3001 real_4 _pchdf (int_4 _p_ k_, real_4 _p_ x_, real_4 _p_ s_, int_4 _p_ ierr_)
3002 { // ** body not listed **
3040 }
3041 int_4 _pchdoc (void)
3042 { // ** body not listed **
3045 }
3046 int_4 _pchfd (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ f_, real_4 _p_ d_, int_4 _p_ incfd_, logical_4 _p_ skip_, int_4
3047 _p_ ne_, real_4 _p_ xe_, real_4 _p_ fe_, real_4 _p_ de_, int_4 _p_ ierr_)
3048 { // ** body not listed **
3165 }
3166 int_4 _pchfe (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ f_, real_4 _p_ d_, int_4 _p_ incfd_, logical_4 _p_ skip_, int_4
3167 _p_ ne_, real_4 _p_ xe_, real_4 _p_ fe_, int_4 _p_ ierr_)
3168 { // ** body not listed **
3285 }
3286 real_4 _pchia (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ f_, real_4 _p_ d_, int_4 _p_ incfd_, logical_4 _p_ skip_, real_4
3287 _p_ a_, real_4 _p_ b_, int_4 _p_ ierr_)
3288 { // ** body not listed **
3403 }
3404 int_4 _pchic (int_4 _p_ ic_, real_4 _p_ vc_, real_4 _p_ switch_, int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ f_, real_4 _p_
3405 d_, int_4 _p_ incfd_, real_4 _p_ wk_, int_4 _p_ nwk_, int_4 _p_ ierr_)
3406 { // ** body not listed **
3507 }
3508 real_4 _pchid (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ f_, real_4 _p_ d_, int_4 _p_ incfd_, logical_4 _p_ skip_, int_4
3509 _p_ ia_, int_4 _p_ ib_, int_4 _p_ ierr_)
3510 { // ** body not listed **
3604 }
3605 int_4 _pchim (int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ f_, real_4 _p_ d_, int_4 _p_ incfd_, int_4 _p_ ierr_)
3606 { // ** body not listed **
3740 }
3741 int_4 _pchkt (int_4 _p_ n_, real_4 _p_ x_, int_4 _p_ knotyp_, real_4 _p_ t_)
3742 { // ** body not listed **
3770 }
3771 int_4 _pchsp (int_4 _p_ ic_, real_4 _p_ vc_, int_4 _p_ n_, real_4 _p_ x_, real_4 _p_ f_, real_4 _p_ d_, int_4 _p_
3772 incfd_, real_4 _p_ wk_, int_4 _p_ nwk_, int_4 _p_ ierr_)
3773 { // ** body not listed **
4011 }
4012 real_4 _pchst (real_4 _p_ arg1_, real_4 _p_ arg2_)
4013 { // ** body not listed **
4043 }
4044 int_4 _pchsw (real_4 _p_ dfmax_, int_4 _p_ iextrm_, real_4 _p_ d1_, real_4 _p_ d2_, real_4 _p_ h_, real_4 _p_ slope_,
4045 int_4 _p_ ierr_)
4046 { // ** body not listed **
4180 }
© 2002-2025 J.M. van der Veer (jmvdveer@xs4all.nl)
|