MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / py_hypot

Function py_hypot

internal/cbm/pdf/pdf_text.c:104–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104static double py_hypot(double a, double b) {
105 double x0 = fabs(a);
106 double x1 = fabs(b);
107 double max = 0.0;
108 bool nan = false;
109 if (isnan(x0)) {
110 nan = true;
111 } else if (x0 > max) {
112 max = x0;
113 }
114 if (isnan(x1)) {
115 nan = true;
116 } else if (x1 > max) {
117 max = x1;
118 }
119 if (isinf(max)) {
120 return max;
121 }
122 if (nan) {
123 return NAN;
124 }
125 if (max == 0.0) {
126 return max;
127 }
128 return vec_norm2(x0, x1, max);
129}
130
131/* ── Page text ───────────────────────────────────────────────────── */
132

Callers 1

showFunction · 0.85

Calls 1

vec_norm2Function · 0.85

Tested by

no test coverage detected