Skip to content

Commit 8e0db7c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent cecf335 commit 8e0db7c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

maths/wronskian_second_order_de.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
import math
1818
import cmath
1919

20-
def compute_characteristic_roots(a: float, b: float, c: float) -> tuple[complex, complex]:
20+
21+
def compute_characteristic_roots(
22+
a: float, b: float, c: float
23+
) -> tuple[complex, complex]:
2124
"""
2225
Compute characteristic roots for a second-order homogeneous linear DE.
2326
@@ -29,7 +32,7 @@ def compute_characteristic_roots(a: float, b: float, c: float) -> tuple[complex,
2932
if a == 0:
3033
raise ValueError("Coefficient 'a' cannot be zero for a second-order equation.")
3134

32-
discriminant = b ** 2 - 4 * a * c
35+
discriminant = b**2 - 4 * a * c
3336
sqrt_disc = cmath.sqrt(discriminant)
3437
root1 = (-b + sqrt_disc) / (2 * a)
3538
root2 = (-b - sqrt_disc) / (2 * a)
@@ -137,7 +140,5 @@ def main() -> None:
137140
analyze_differential_equation(a, b, c)
138141

139142

140-
141143
if __name__ == "__main__":
142-
main() # doctest: +SKIP
143-
144+
main() # doctest: +SKIP

0 commit comments

Comments
 (0)