We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当幂函数的指数不是整数时,图像是出不来的,比如 y = x^2.1 ,这是因为Math.pow(a,b);这个函数不支持 a<0且b不是整数的情况,此种情况会导致 domain error 错误。而程序会生成 x 小于0的点和 x 大于 0的点,当 x 小于0 求 y值时,所得y = NaN,故导致函数点无法绘制,函数图像绘制失败。请知悉。 我的解决办法是 当指数不是整数时,不生成x < 0的点,这样导致函数只有x>0的部分,但不会报错不显示。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
当幂函数的指数不是整数时,图像是出不来的,比如 y = x^2.1 ,这是因为Math.pow(a,b);这个函数不支持 a<0且b不是整数的情况,此种情况会导致 domain error 错误。而程序会生成 x 小于0的点和 x 大于 0的点,当 x 小于0 求 y值时,所得y = NaN,故导致函数点无法绘制,函数图像绘制失败。请知悉。
我的解决办法是 当指数不是整数时,不生成x < 0的点,这样导致函数只有x>0的部分,但不会报错不显示。
The text was updated successfully, but these errors were encountered: