File: vfrexp.c

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (24 lines) | stat: -rw-r--r-- 411 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <math.h>
#include "../machine.h"
void C2F(vfrexp)(n,x,ix,y,iy,z,iz)
     double *x, *y;
     double *z;
     int *n, *ix, *iy, *iz;
{
  int ix1,iy1,iz1,i,j;
  ix1=0;
  iy1=0;
  iz1=0;

  if (*ix<0) ix1=-(*n-1)*(*ix);
  if (*iy<0) iy1=-(*n-1)*(*iy);
  if (*iz<0) iz1=-(*n-1)*(*iz);

  for (i=0;i<*n;i++) {
    y[iy1]=frexp(x[ix1],&j);
    z[iz1]=j;
    iy1 += *iy;
    ix1 += *ix;
    iz1 += *iz;
  }
}