OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [libm/] [w_cabs.c] - Blame information for rev 1771

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1325 phoenix
/*
2
 * cabs() wrapper for hypot().
3
 *
4
 * Written by J.T. Conklin, <jtc@wimsey.com>
5
 * Placed into the Public Domain, 1994.
6
 */
7
 
8
#include <math.h>
9
 
10
struct complex {
11
        double x;
12
        double y;
13
};
14
 
15
double cabs(struct complex z)
16
{
17
        return hypot(z.x, z.y);
18
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.