为什么定义 PI = 4*ATAN(1.d0) [英] Why define PI = 4*ATAN(1.d0)

查看:11
本文介绍了为什么定义 PI = 4*ATAN(1.d0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将 PI 定义为的动机是什么

What is the motivation for defining PI as

PI=4.D0*DATAN(1.D0)

在 Fortran 77 代码中?我了解它的工作原理,但是,原因是什么?

within Fortran 77 code? I understand how it works, but, what is the reasoning?

推荐答案

此样式可确保在为 PI 赋值时使用任何架构上可用的最大精度.

This style ensures that the maximum precision available on ANY architecture is used when assigning a value to PI.

这篇关于为什么定义 PI = 4*ATAN(1.d0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆