fortran-iv.f

     
   1  ! @file fortran-iv.f
   2  ! From viflib
   3  ! Adapted for VIF beta-0.9.97
   4  ! Saturday 11 January 2025
   5  !
   6  ! @section Synopsis
   7  !
   8  ! FORTRAN IV intrinsic library functions for VIF.
   9  !
  10  ! @author J. Marcel van der Veer
  11  !
  12  ! @section copyright
  13  !
  14  ! This file is part of VIF - vintage fortran compiler.
  15  ! Copyright 2020 - 2025 J. Marcel van der Veer <algol68g@xs4all.nl>.
  16  !
  17  ! @section license
  18  !
  19  ! This program is free software; you can redistribute it and/or modify it
  20  ! under the terms of the gnu general public license as published by the
  21  ! free software foundation; either version 3 of the license, or
  22  ! (at your option) any later version.
  23  !
  24  ! This program is distributed in the hope that it will be useful, but
  25  ! without any warranty; without even the implied warranty of merchantability
  26  ! or fitness for a particular purpose. See the GNU general public license for
  27  ! more details. you should have received a copy of the GNU general public
  28  ! license along with this program. If not, see <http://www.gnu.org/licenses/>.
  29  
  30  ! Intrinsic FORTRAN IV library functions applied when an intrinsic function
  31  ! is passed as a subprogram argument.
  32  
  33  ! real*4
  34  
  35        real*4 function sqrtf (x)
  36        implicit real*4 (a - z)
  37        sqrtf = sqrt (x)
  38        return
  39        end
  40  
  41        real*4 function expf (x)
  42        implicit real*4 (a - z)
  43        expf = exp (x)
  44        return
  45        end
  46  
  47        real*4 function logf (x)
  48        implicit real*4 (a - z)
  49        logf = log (x)
  50        return
  51        end
  52  
  53        real*4 function log10f (x)
  54        implicit real*4 (a - z)
  55        log10f = log10 (x)
  56        return
  57        end
  58  
  59        real*4 function sinf (x)
  60        implicit real*4 (a - z)
  61        sinf = sin (x)
  62        return
  63        end
  64  
  65        real*4 function asinf (x)
  66        implicit real*4 (a - z)
  67        asinf = asin (x)
  68        return
  69        end
  70  
  71        real*4 function acosf (x)
  72        implicit real*4 (a - z)
  73        acosf = acos (x)
  74        return
  75        end
  76  
  77        real*4 function cosf (x)
  78        implicit real*4 (a - z)
  79        cosf = cos (x)
  80        return
  81        end
  82  
  83        real*4 function tanf (x)
  84        implicit real*4 (a - z)
  85        tanf = tan (x)
  86        return
  87        end
  88  
  89        real*4 function atanf (x)
  90        implicit real*4 (a - z)
  91        atanf = atan (x)
  92        return
  93        end
  94  
  95        real*4 function atan2f (x, y)
  96        implicit real*4 (a - z)
  97        atan2f = atan2 (x, y)
  98        return
  99        end
 100  
 101  ! real*8
 102  
 103        real*8 function dsqrt (x)
 104        implicit real*8 (a - z)
 105        dsqrt = sqrt (x)
 106        return
 107        end
 108  
 109        real*8 function dexp (x)
 110        implicit real*8 (a - z)
 111        dexp = exp (x)
 112        return
 113        end
 114  
 115        real*8 function dlog (x)
 116        implicit real*8 (a - z)
 117        dlog = log (x)
 118        return
 119        end
 120  
 121        real*8 function dlog10 (x)
 122        implicit real*8 (a - z)
 123        dlog10 = log10 (x)
 124        return
 125        end
 126  
 127        real*8 function dsin (x)
 128        implicit real*8 (a - z)
 129        dsin = sin (x)
 130        return
 131        end
 132  
 133        real*8 function dasin (x)
 134        implicit real*8 (a - z)
 135        dasin = asin (x)
 136        return
 137        end
 138  
 139        real*8 function dacos (x)
 140        implicit real*8 (a - z)
 141        dacos = acos (x)
 142        return
 143        end
 144  
 145        real*8 function dcos (x)
 146        implicit real*8 (a - z)
 147        dcos = cos (x)
 148        return
 149        end
 150  
 151        real*8 function dtan (x)
 152        implicit real*8 (a - z)
 153        dtan = tan (x)
 154        return
 155        end
 156  
 157        real*8 function datan (x)
 158        implicit real*8 (a - z)
 159        datan = atan (x)
 160        return
 161        end
 162  
 163        real*8 function datan2 (x, y)
 164        implicit real*8 (a - z)
 165        datan2 = atan2 (x, y)
 166        return
 167        end
 168  
 169  ! real*16
 170  
 171        real*16 function qsqrt (x)
 172        implicit real*16 (a - z)
 173        qsqrt = sqrt (x)
 174        return
 175        end
 176  
 177        real*16 function qexp (x)
 178        implicit real*16 (a - z)
 179        qexp = exp (x)
 180        return
 181        end
 182  
 183        real*16 function qlog (x)
 184        implicit real*16 (a - z)
 185        qlog = log (x)
 186        return
 187        end
 188  
 189        real*16 function qlog10 (x)
 190        implicit real*16 (a - z)
 191        qlog10 = log10 (x)
 192        return
 193        end
 194  
 195        real*16 function qsin (x)
 196        implicit real*16 (a - z)
 197        qsin = sin (x)
 198        return
 199        end
 200  
 201        real*16 function qasin (x)
 202        implicit real*16 (a - z)
 203        qasin = asin (x)
 204        return
 205        end
 206  
 207        real*16 function qacos (x)
 208        implicit real*16 (a - z)
 209        qacos = acos (x)
 210        return
 211        end
 212  
 213        real*16 function qcos (x)
 214        implicit real*16 (a - z)
 215        qcos = cos (x)
 216        return
 217        end
 218  
 219        real*16 function qtan (x)
 220        implicit real*16 (a - z)
 221        qtan = tan (x)
 222        return
 223        end
 224  
 225        real*16 function qatan (x)
 226        implicit real*16 (a - z)
 227        qatan = atan (x)
 228        return
 229        end
 230  
 231        real*16 function qatan2 (x, y)
 232        implicit real*16 (a - z)
 233        qatan2 = atan2 (x, y)
 234        return
 235        end
 236  
 237  ! real*32
 238  
 239        real*32 function xsqrt (x)
 240        implicit real*32 (a - z)
 241        xsqrt = sqrt (x)
 242        return
 243        end
 244  
 245        real*32 function xexp (x)
 246        implicit real*32 (a - z)
 247        xexp = exp (x)
 248        return
 249        end
 250  
 251        real*32 function xlog (x)
 252        implicit real*32 (a - z)
 253        xlog = log (x)
 254        return
 255        end
 256  
 257        real*32 function xlog10 (x)
 258        implicit real*32 (a - z)
 259        xlog10 = log10 (x)
 260        return
 261        end
 262  
 263        real*32 function xsin (x)
 264        implicit real*32 (a - z)
 265        xsin = sin (x)
 266        return
 267        end
 268  
 269        real*32 function xasin (x)
 270        implicit real*32 (a - z)
 271        xasin = asin (x)
 272        return
 273        end
 274  
 275        real*32 function xacos (x)
 276        implicit real*32 (a - z)
 277        xacos = acos (x)
 278        return
 279        end
 280  
 281        real*32 function xcos (x)
 282        implicit real*32 (a - z)
 283        xcos = cos (x)
 284        return
 285        end
 286  
 287        real*32 function xtan (x)
 288        implicit real*32 (a - z)
 289        xtan = tan (x)
 290        return
 291        end
 292  
 293        real*32 function xatan (x)
 294        implicit real*32 (a - z)
 295        xatan = atan (x)
 296        return
 297        end
 298  
 299        real*32 function xatan2 (x, y)
 300        implicit real*32 (a - z)
 301        xatan2 = atan2 (x, y)
 302        return
 303        end
 304  
 305  ! complex*8
 306  
 307        complex*8 function csqrtf (x)
 308        implicit complex*8 (a - z)
 309        csqrtf = sqrt (x)
 310        return
 311        end
 312  
 313        complex*8 function cexpf (x)
 314        implicit complex*8 (a - z)
 315        cexpf = exp (x)
 316        return
 317        end
 318  
 319        complex*8 function clogf (x)
 320        implicit complex*8 (a - z)
 321        clogf = log (x)
 322        return
 323        end
 324  
 325        complex*8 function csinf (x)
 326        implicit complex*8 (a - z)
 327        csinf = sin (x)
 328        return
 329        end
 330  
 331        complex*8 function ccosf (x)
 332        implicit complex*8 (a - z)
 333        ccosf = cos (x)
 334        return
 335        end
 336  
 337        complex*8 function ctanf (x)
 338        implicit complex*8 (a - z)
 339        ctanf = tan (x)
 340        return
 341        end
 342  
 343  ! complex*16
 344  
 345        complex*16 function cdsqrt (x)
 346        implicit complex*16 (a - z)
 347        cdsqrt = sqrt (x)
 348        return
 349        end
 350  
 351        complex*16 function cdexp (x)
 352        implicit complex*16 (a - z)
 353        cdexp = exp (x)
 354        return
 355        end
 356  
 357        complex*16 function cdlog (x)
 358        implicit complex*16 (a - z)
 359        cdlog = log (x)
 360        return
 361        end
 362  
 363        complex*16 function cdsin (x)
 364        implicit complex*16 (a - z)
 365        cdsin = sin (x)
 366        return
 367        end
 368  
 369        complex*16 function cdcos (x)
 370        implicit complex*16 (a - z)
 371        cdcos = cos (x)
 372        return
 373        end
 374  
 375        complex*16 function cdtan (x)
 376        implicit complex*16 (a - z)
 377        cdtan = tan (x)
 378        return
 379        end
 380  
 381  ! complex*32
 382  
 383        complex*32 function cqsqrt (x)
 384        implicit complex*32 (a - z)
 385        cqsqrt = sqrt (x)
 386        return
 387        end
 388  
 389        complex*32 function cqexp (x)
 390        implicit complex*32 (a - z)
 391        cqexp = exp (x)
 392        return
 393        end
 394  
 395        complex*32 function cqlog (x)
 396        implicit complex*32 (a - z)
 397        cqlog = log (x)
 398        return
 399        end
 400  
 401        complex*32 function cqsin (x)
 402        implicit complex*32 (a - z)
 403        cqsin = sin (x)
 404        return
 405        end
 406  
 407        complex*32 function cqcos (x)
 408        implicit complex*32 (a - z)
 409        cqcos = cos (x)
 410        return
 411        end
 412  
 413        complex*32 function cqtan (x)
 414        implicit complex*32 (a - z)
 415        cqtan = tan (x)
 416        return
 417        end
 418  
 419  ! complex*64
 420  
 421        complex*64 function cxsqrt (x)
 422        implicit complex*64 (a - z)
 423        cxsqrt = sqrt (x)
 424        return
 425        end
 426  
 427        complex*64 function cxexp (x)
 428        implicit complex*64 (a - z)
 429        cxexp = exp (x)
 430        return
 431        end
 432  
 433        complex*64 function cxlog (x)
 434        implicit complex*64 (a - z)
 435        cxlog = log (x)
 436        return
 437        end
 438  
 439        complex*64 function cxsin (x)
 440        implicit complex*64 (a - z)
 441        cxsin = sin (x)
 442        return
 443        end
 444  
 445        complex*64 function cxcos (x)
 446        implicit complex*64 (a - z)
 447        cxcos = cos (x)
 448        return
 449        end
 450  
 451        complex*64 function cxtan (x)
 452        implicit complex*64 (a - z)
 453        cxtan = tan (x)
 454        return
 455        end
     


© 2002-2025 J.M. van der Veer (jmvdveer@xs4all.nl)