Mathematica基础——数值转化

时间:2024-10-13 20:09:41

1、首先给出圆周率π。

Mathematica基础——数值转化

2、然后计算π的近似数形态:Pi//N

Mathematica基础——数值转化

3、再提高Pi的精度:Table[N[Pi,n],{n,10,100,10}]

Mathematica基础——数值转化

4、把π转化为有理分式的形态:Rationalize[3.141592]但,有时候也会失败!

Mathematica基础——数值转化Mathematica基础——数值转化

5、若需要提高精度,可以这样:Rationalize[Pi, 10^-100]误差少于10^-100。

Mathematica基础——数值转化Mathematica基础——数值转化
© 2025 一点知道
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com