F#中的度量单位的分数幂 [英] Fractional power of units of measures in F#

查看:77
本文介绍了F#中的度量单位的分数幂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是真的吗: F#中没有小数功率单位

推荐答案

除了已经说过的以外,关于(不仅是)F#度量单位的信息的最佳资源是

In addition to what has already been said, the best resource for information about (not just) F# units of measure is Andrew Kennedy's PhD thesis, who actually designed F# units. He mentions fractional units:

最重要的决定是是否允许使用分数指数 尺寸.反对他们的观点是哲学上的:一个带有 像M 1/2 这样的尺寸在物理上是没有意义的,如果出现这种情况,它将 建议修改基本维度集,而不是重新评估 积分指数.赞成的观点是务实的:有时更容易 编写程序代码,以临时创建一个维数为 小数指数.在本文中,前者的观点盛行,而部分观点 不考虑指数.但是,大多数理论只适用于 相同的;任何潜在的差异都会在出现时予以突出显示.

The most important decision is whether or not to allow fractional exponents of dimensions. The argument against them is philosophical: a quantity with a dimension such as M1/2 makes no sense physically, and if such a thing arose, it would suggest revision of the set of base dimensions rather than a re-evaluation of integral exponents. The argument in favour is pragmatic: sometimes it is easier to write program code which temporarily creates a value whose dimension has fractional exponents. In this dissertation the former view prevails, and fractional exponents are not considered. However, most of the theory would apply just the same; any potential differences are highlighted as they arise.

我认为这实质上是F#没有分数单位的原因,因为F#设计非常接近Andrew Kennedy的工作,以确保它是合理的.

I think this is essentially the reason why F# does not have fractional units, because the F# design quite closely follows Andrew Kennedy's work to make sure it is sound.

更新:在F#4.0中,已实施

这篇关于F#中的度量单位的分数幂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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