You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed on Discourse, simplify_fractions does not work in the example below. Also, as far as I can tell, simplify_fractions is not in the documentation.
Example
using Symbolics
@variables a b c d e f g
x1 = (a+b) / (c + d) + (g+f) / (e + d)
simplify_fractions(x1)
Version
Julia 1.6.3, Symbolics 3.4.1
The text was updated successfully, but these errors were encountered:
Here is another example, that throws a different error:
using Symbolics
normal01(x) =1/√(2pi)*exp(-x^2/2)
normal(x,μ,σ) =1/σ*normal01((x-μ)/σ)
@syms x μ t
f =normal(x,μ,√(t))
f1 = Symbolics.derivative(f, t)
display(f1)
Symbolics.simplify_fractions(f1)
This is another example, which throws the same error as @jw3126 's case.
using Symbolics
@variables a b
x = (-48*a -4*a*(b^2)) / (a*(b^3)) -2*b*(12/(b^4))
simplify_fractions(x)
ERROR: DivideError: integer division error
And, I found that the following part of the function rm_gcds accidentally changed the type of coefficients from integer to floating point, which might be not expected.
# ns[i] = -4(b^6)*a - 72(b^4)*a, g = a
ns[i] =div(ns[i], g) # line: 466# ns[i] = -4.0(b^6) - 72.0(b^4)
ds[j] =div(ds[j], g) # line: 467 (Error occurs at this line)
The function rm_gcds is used in simplify_div, which is included in simplify_fractions.
As discussed on Discourse,
simplify_fractions
does not work in the example below. Also, as far as I can tell,simplify_fractions
is not in the documentation.Example
Version
Julia 1.6.3, Symbolics 3.4.1
The text was updated successfully, but these errors were encountered: