f# - F#中的度量单位的分数幂

标签 f# units-of-measurement

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

最佳答案

除了已经说过的以外,关于(不仅仅是)F#度量单位的信息的最佳资源是Andrew Kennedy's PhD thesis,他实际上是设计F#单位的。他提到分数单位:

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的工作,以确保声音合理。

更新:在F#4.0中,对小数指数的支持已成为implemented

关于f# - F#中的度量单位的分数幂,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11333135/

相关文章:

html - 我应该在 HTML 中使用 % 还是 'px'

silverlight - 关于 Silverlight 的度量单位的问题

ios - 您能否通过 iOS 应用确定您的用户所在的国家/地区?

f# - string.IsNullOrEmpty() 的 F# 等价物是什么?

f# - Pause Monad - monadic 类型应该是什么样的?

c# - .Net 中非常大的集合导致内存不足异常

F# 记录 : Dangerous, 仅用于有限用途,还是使用良好的功能?

F# 如何设置可以使用 FsUnit 的 FAKE 项目

css - CSS rem 单位有多精细?