Skip to content

Commit

Permalink
fix: preventing rounding off of exponents for dimensional analysis
Browse files Browse the repository at this point in the history
Rounding off can prevent addition from working
  • Loading branch information
mgreminger committed Jan 10, 2025
1 parent 1be9d28 commit 0377899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/dimensional_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ def custom_pow(base: Expr, exponent: Expr):
def custom_pow_dims(dim_values: DimValues, base: Expr, exponent: Expr):
if custom_get_dimensional_dependencies(exponent) != {}:
raise TypeError('Exponent Not Dimensionless')
return Pow(base.evalf(PRECISION), (dim_values["args"][1]).evalf(PRECISION))
return Pow(base, dim_values["args"][1])

CP = None

Expand Down

0 comments on commit 0377899

Please sign in to comment.