github.com/gopherd/gonum@v0.0.4/mathext/internal/amos/amoslib/zexp.f (about) 1 SUBROUTINE ZEXP(AR, AI, BR, BI) 2 C***BEGIN PROLOGUE ZEXP 3 C***REFER TO ZBESH,ZBESI,ZBESJ,ZBESK,ZBESY,ZAIRY,ZBIRY 4 C 5 C DOUBLE PRECISION COMPLEX EXPONENTIAL FUNCTION B=EXP(A) 6 C 7 C***ROUTINES CALLED (NONE) 8 C***END PROLOGUE ZEXP 9 DOUBLE PRECISION AR, AI, BR, BI, ZM, CA, CB 10 ZM = DEXP(AR) 11 CA = ZM*DCOS(AI) 12 CB = ZM*DSIN(AI) 13 BR = CA 14 BI = CB 15 RETURN 16 END