Sha256: 5d06d6346bcfb89646f94d9b9c49c5de19e48204a842b13c0dccdf9485d3df99

Contents?: true

Size: 267 Bytes

Versions: 129

Compression:

Stored size: 267 Bytes

Contents

/* public domain rewrite of hypot */

#include <math.h>

double hypot(double x, double y)
{
    if (x < 0) x = -x;
    if (y < 0) y = -y;
    if (x < y) {
	double tmp = x;
	x = y; y = tmp;
    }
    if (y == 0.0) return x;
    y /= x;
    return x * sqrt(1.0+y*y);
}

Version data entries

129 entries across 129 versions & 2 rubygems

Version Path
rhodes-5.5.18 platform/shared/ruby/missing/hypot.c
rhodes-5.5.17 platform/shared/ruby/missing/hypot.c
rhodes-5.5.15 platform/shared/ruby/missing/hypot.c
rhodes-5.5.0.22 platform/shared/ruby/missing/hypot.c
rhodes-5.5.2 platform/shared/ruby/missing/hypot.c
rhodes-5.5.0.7 platform/shared/ruby/missing/hypot.c
rhodes-5.5.0.3 platform/shared/ruby/missing/hypot.c
rhodes-5.5.0 platform/shared/ruby/missing/hypot.c
tauplatform-1.0.3 platform/shared/ruby/missing/hypot.c
tauplatform-1.0.2 platform/shared/ruby/missing/hypot.c
tauplatform-1.0.1 platform/shared/ruby/missing/hypot.c
rhodes-3.3.5 platform/shared/ruby/missing/hypot.c
rhodes-3.4.2 platform/shared/ruby/missing/hypot.c
rhodes-3.3.4 platform/shared/ruby/missing/hypot.c
rhodes-3.3.3 platform/shared/ruby/missing/hypot.c
rhodes-3.3.3.beta.4 platform/shared/ruby/missing/hypot.c
rhodes-3.3.3.beta.3 platform/shared/ruby/missing/hypot.c
rhodes-3.3.3.beta.2 platform/shared/ruby/missing/hypot.c
rhodes-3.3.3.beta.1 platform/shared/ruby/missing/hypot.c
rhodes-3.3.2 platform/shared/ruby/missing/hypot.c