Fixedpoint returns wrong result
bertschi opened this issue · comments
Hi,
consider the following function:
f(x, p) = p .* x
When I solve for a fixed point everything works fine when p != 0. But when p = 0, the call
fixedpoint(x -> f(x, 0.), [1.2])
just returns the initial condition, e.g. 1.2, and not the fixed point of zero. This also occurs when setting m = 0 which according to the documentation just gives Picard iteration. Don't understand how this could possibly fail. Any ideas?
Nils
Can you show me the output? I get the correct answer.
I'm seeing some test noise wrt fixedpoints so I'm looking into it.
Your right, it works in version 4.2.0
julia> fixedpoint(x -> f(x, 0.), [1.2])
Results of Nonlinear Solver Algorithm
- Algorithm: Anderson m=1 beta=1 aa_start=1 droptol=0
- Starting Point: [1.2]
- Zero: [0.0]
- Inf-norm of residuals: 0.000000
- Iterations: 2
- Convergence: true
- |x - x'| < 0.0e+00: true
- |f(x)| < 1.0e-08: true
- Function Calls (f): 2
- Jacobian Calls (df/dx): 0
With version 4.0.0 instead, I get
fixedpoint(x -> f(x, 0.), [1.2])
Results of Nonlinear Solver Algorithm
- Algorithm: Anderson m=5 beta=1.0
- Starting Point: [1.2]
- Zero: [1.2]
- Inf-norm of residuals: 1.200000
- Iterations: 1
- Convergence: true
- |x - x'| < 0.0e+00: true
- |f(x)| < 1.0e-08: false
- Function Calls (f): 1
- Jacobian Calls (df/dx): 0
In any case, I was running on Julia 1.3.0. Will upgrade my dependencies which hopefully also solves the issue with my larger model.
Fingers crossed :)
I think this solved your bug 9b4c7b3