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

polynomial expression precision #40

Open
feidudu1 opened this issue Aug 13, 2021 · 0 comments
Open

polynomial expression precision #40

feidudu1 opened this issue Aug 13, 2021 · 0 comments

Comments

@feidudu1
Copy link

feidudu1 commented Aug 13, 2021

echarts-stat/src/regression.js

if (i > 1) {
	string += Math.round(coeArray[i] * Math.pow(10, i + 1)) / Math.pow(10, i + 1) + 'x^' + i + ' + ';
}

this result in dispaly as 0x^2 + -0.01x + 36.58, the expected expression is -0.0005x^2 + -0.01x + 36.58
graph used echarts-stat
image
graph used excel
image

@feidudu1 feidudu1 changed the title polynomial expression x^ polynomial expression precision Aug 13, 2021
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

1 participant