MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / nested_expression

Function nested_expression

benchmarks/python-performance.py:53–55  ·  view source on GitHub ↗

r"""Nested Expression: \sqrt{(x-a)^2 + (y-b)^2 + (z-c)^2}

(x, y, z, a, b, c)

Source from the content-addressed store, hash-verified

51
52import numpy as np
53def nested_expression(x, y, z, a, b, c):
54 r"""Nested Expression: \sqrt{(x-a)^2 + (y-b)^2 + (z-c)^2}"""
55 return np.sqrt((-a + x) ** 2 + (-b + y) ** 2 + (-c + z) ** 2)
56
57
58import numpy as np

Callers 1

run_benchmarksFunction · 0.85

Calls 1

sqrtMethod · 0.65

Tested by

no test coverage detected