Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Mar 20, 2024
1 parent 379cb37 commit 178ff34
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/nl_to_polynomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,9 @@ end

_checked_div(a, b) = a / b

function _checked_div(
α,
p::MP.AbstractPolynomialLike,
)
function _checked_div(α, p::MP.AbstractPolynomialLike)
if !MP.isconstant(p)
throw(
InvalidNLExpression("Cannot convert `α / ($p)` to a polynomial."),
)
throw(InvalidNLExpression("Cannot convert `α / ($p)` to a polynomial."))
end
return MP.constant_term/ MP.convert_to_constant(p), p)
end
Expand All @@ -123,7 +118,9 @@ function _checked_div(
divisor, remainder = Base.divrem(a, b)
if !iszero(remainder)
throw(
InvalidNLExpression("Cannot convert `($(a)) / ($b)` into a polynomial as the Euclidean division has a nonzero remainder `$remainder` (the divisor is `$divisor`)."),
InvalidNLExpression(
"Cannot convert `($(a)) / ($b)` into a polynomial as the Euclidean division has a nonzero remainder `$remainder` (the divisor is `$divisor`).",
),
)
end
return divisor
Expand Down

0 comments on commit 178ff34

Please sign in to comment.