Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RobTillaart/Arduino
/ c_sqrt
Method
c_sqrt
libraries/Complex/complex.cpp:146–153 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
144
145
146
Complex Complex::c_sqrt() const
147
{
148
float m = modulus();
149
float r = sqrt(0.5 * (m + re));
150
float i = sqrt(0.5 * (m - re));
151
if (im < 0) i = -i;
152
return Complex(r, i);
153
}
154
155
156
Complex Complex::c_exp() const
Callers
3
gonioHelper1
Method · 0.80
gonioHelper2
Method · 0.80
unittest
Function · 0.80
Calls
2
sqrt
Function · 0.85
Complex
Class · 0.85
Tested by
1
unittest
Function · 0.64