C=============================================================================== C RPL/2 (R) version 4.1.19 C Copyright (C) 1989-2014 Dr. BERTRAND Joël C C This file is part of RPL/2. C C RPL/2 is free software; you can redistribute it and/or modify it C under the terms of the CeCILL V2 License as published by the french C CEA, CNRS and INRIA. C C RPL/2 is distributed in the hope that it will be useful, but WITHOUT C ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or C FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL V2 License C for more details. C C You should have received a copy of the CeCILL License C along with RPL/2. If not, write to info@cecill.info. C=============================================================================== C-- Addition ------------------------------------------------------------------- subroutine F77ADDITIONCI(CA, IB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT integer*8 IB CB = dcmplx(IB) RESULTAT = CA + CB return end subroutine F77ADDITIONCC(CA, CB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT RESULTAT = CA + CB return end subroutine F77ADDITIONCR(CA, RB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT real*8 RB CB = dcmplx(RB) RESULTAT = CA + CB return end C-- Multiplication ------------------------------------------------------------- subroutine F77MULTIPLICATIONCI(CA, IB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT integer*8 IB CB = dcmplx(IB) RESULTAT = CA * CB return end subroutine F77MULTIPLICATIONCC(CA, CB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT RESULTAT = CA * CB return end subroutine F77MULTIPLICATIONCR(CA, RB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT real*8 RB CB = dcmplx(RB) RESULTAT = CA * CB return end C-- Soustraction --------------------------------------------------------------- subroutine F77SOUSTRACTIONCI(CA, IB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT integer*8 IB CB = dcmplx(IB) RESULTAT = CA - CB return end subroutine F77SOUSTRACTIONIC(IA, CB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT integer*8 IA CA = dcmplx(IA) RESULTAT = CA - CB return end subroutine F77SOUSTRACTIONCC(CA, CB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT RESULTAT = CA - CB return end subroutine F77SOUSTRACTIONCR(CA, RB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT real*8 RB CB = dcmplx(RB) RESULTAT = CA - CB return end subroutine F77SOUSTRACTIONRC(RA, CB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT real*8 RA CA = dcmplx(RA) RESULTAT = CA - CB return end C-- Division ------------------------------------------------------------------- subroutine F77DIVISIONCI(CA, IB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT integer*8 IB CB = dcmplx(IB) RESULTAT = CA / CB return end subroutine F77DIVISIONIC(IA, CB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT integer*8 IA CA = dcmplx(IA) RESULTAT = CA / CB return end subroutine F77DIVISIONCC(CA, CB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT RESULTAT = CA / CB return end subroutine F77DIVISIONCR(CA, RB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT real*8 RB CB = dcmplx(RB) RESULTAT = CA / CB return end subroutine F77DIVISIONRC(RA, CB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT real*8 RA CA = dcmplx(RA) RESULTAT = CA / CB return end C-- Puissance ------------------------------------------------------------------ subroutine F77PUISSANCEII(IA, IB, RESULTAT) implicit none integer*8 IA integer*8 IB integer*8 RESULTAT RESULTAT = IA ** IB return end subroutine F77PUISSANCEIR(IA, RB, RESULTAT) implicit none integer*8 IA real*8 RB real*8 RESULTAT RESULTAT = IA ** RB return end subroutine F77PUISSANCEIC(IA, CB, RESULTAT) implicit none complex*16 CB complex*16 RESULTAT integer*8 IA RESULTAT = IA ** CB return end subroutine F77PUISSANCERI(RA, IB, RESULTAT) implicit none integer*8 IB real*8 RA real*8 RESULTAT RESULTAT = RA ** IB return end subroutine F77PUISSANCERR(RA, RB, RESULTAT) implicit none real*8 RA real*8 RB real*8 RESULTAT RESULTAT = RA ** RB return end subroutine F77PUISSANCERC(RA, CB, RESULTAT) implicit none complex*16 CB complex*16 RESULTAT real*8 RA RESULTAT = RA ** CB return end subroutine F77PUISSANCECI(CA, IB, RESULTAT) implicit none complex*16 CA complex*16 RESULTAT integer*8 IB RESULTAT = CA ** IB return end subroutine F77PUISSANCECR(CA, RB, RESULTAT) implicit none complex*16 CA complex*16 RESULTAT real*8 RB RESULTAT = CA ** RB return end subroutine F77PUISSANCECC(CA, CB, RESULTAT) implicit none complex*16 CA complex*16 CB complex*16 RESULTAT RESULTAT = CA ** CB return end C-- Racine carrée -------------------------------------------------------------- subroutine F77RACINECARREEIP(IA, RESULTAT) implicit none integer*8 IA real*8 RA real*8 RESULTAT RA = dble(IA) RESULTAT = sqrt(RA) return end subroutine F77RACINECARREEIN(IA, RESULTAT) implicit none complex*16 CA complex*16 RESULTAT integer*8 IA CA = dcmplx(IA) RESULTAT = sqrt(CA) return end subroutine F77RACINECARREERP(RA, RESULTAT) implicit none real*8 RA real*8 RESULTAT RESULTAT = sqrt(RA) return end subroutine F77RACINECARREERN(RA, RESULTAT) implicit none complex*16 CA complex*16 RESULTAT real*8 RA CA = dcmplx(RA) RESULTAT = sqrt(CA) return end subroutine F77RACINECARREEC(CA, RESULTAT) implicit none complex*16 CA complex*16 RESULTAT RESULTAT = sqrt(CA) return end C-- Valeur absolue ------------------------------------------------------------- subroutine F77ABSC(C, RESULTAT) implicit none complex*16 C real*8 RESULTAT RESULTAT = ABS(C) return end