From ac241b21aa0191d4e80b9aedad1013d655ef9965 Mon Sep 17 00:00:00 2001 From: jofret Date: Tue, 24 Apr 2007 16:15:57 +0000 Subject: Absolute Value implementation --- src/auxiliaryFunctions/abs/cabss.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/auxiliaryFunctions/abs/cabss.c') diff --git a/src/auxiliaryFunctions/abs/cabss.c b/src/auxiliaryFunctions/abs/cabss.c index e69de29b..a9826990 100644 --- a/src/auxiliaryFunctions/abs/cabss.c +++ b/src/auxiliaryFunctions/abs/cabss.c @@ -0,0 +1,19 @@ +/* +** -*- C -*- +** +** cabss.c +** Made by Bruno JOFRET +** +** Started on Mon Apr 23 17:08:52 2007 jofret +** Last update Mon Apr 23 17:10:22 2007 jofret +** +** Copyright INRIA 2007 +*/ + +#include "abs.h" + +float cabss(floatComplex in) { + float real = creals(in); + float imag = cimags(in); + return (ssqrts( (real*real) + (imag*imag) )); +} -- cgit