~ubuntu-branches/ubuntu/trusty/libf2c2/trusty

« back to all changes in this revision

Viewing changes to libF77/c_exp.c

  • Committer: Bazaar Package Importer
  • Author(s): Alan Bain
  • Date: 2008-05-19 22:50:54 UTC
  • mfrom: (2.1.4 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080519225054-jlymia0wdvvfq7dg
Tags: 20061008-4
Remove CVS directory left in source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "f2c.h"
2
 
 
3
 
#ifdef KR_headers
4
 
extern double exp(), cos(), sin();
5
 
 
6
 
 VOID c_exp(r, z) complex *r, *z;
7
 
#else
8
 
#undef abs
9
 
#include "math.h"
10
 
#ifdef __cplusplus
11
 
extern "C" {
12
 
#endif
13
 
 
14
 
void c_exp(complex *r, complex *z)
15
 
#endif
16
 
{
17
 
        double expx, zi = z->i;
18
 
 
19
 
        expx = exp(z->r);
20
 
        r->r = expx * cos(zi);
21
 
        r->i = expx * sin(zi);
22
 
        }
23
 
#ifdef __cplusplus
24
 
}
25
 
#endif