Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powers w/ 0 constant term returns NaN #33

Closed
agerlach opened this issue Apr 20, 2023 · 2 comments
Closed

Powers w/ 0 constant term returns NaN #33

agerlach opened this issue Apr 20, 2023 · 2 comments

Comments

@agerlach
Copy link

x0 = 0.0
order = 10
td = TaylorScalar{typeof(x0), order}(x0, one(x0));
td*td  # TaylorScalar{Float64, 4}((0.0, 0.0, 2.0, 0.0))
td^2   # TaylorScalar{Float64, 4}((0.0, NaN, NaN, NaN))

Divide by 0 when you have a 0 constant term:

for j in 1:(i - 1)]...)) / v[1]

@tansongchen
Copy link
Member

Yes this is a bug... didn't consider the case that we have a 0 on zeroth order. May need to add as a special case

@tansongchen
Copy link
Member

Fix in #57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants