当前位置:网站首页>在代碼中使用度量單比特,從而生活更美好
在代碼中使用度量單比特,從而生活更美好
2022-07-04 04:49:00 【dotNET跨平臺】
在我們的應用軟件中,涉及到物理化學計算時,只有 Frink 、F#、Modelica 少數語言變量是自帶單比特的,大部分語言變量僅包含數值,單比特轉換需要在變量進行公式計算之前完成,計算後再把結果單比特轉換為輸出單比特,單比特轉換主要通過若幹常數實現。這帶來了兩個問題:
大量常數降低代碼可讀性和維護性;
計算精度難以保障。
UnitsNet 用具有單比特的變量替代double,支持單比特的自動轉換,並(部分)支持不同單比特的乘除計算。使用UnitsNet 寫公式計算代碼,可以避免直接的單比特轉換,使程序的調用者可以使用任意單比特作為輸入。在.NET IoT 將 UnitsNet 用於任何傳感器在綁定中公開的任何單元。在文檔裏有明確的設備 API 的約定:https://github.com/dotnet/iot/blob/main/Documentation/Devices-conventions.md

相關參考文章:
理化計算程序必備:CoolProp+UnitsNet:https://blog.csdn.net/xhydongda/article/details/120663619
深入研究 .NET NANOFRAMEWORK 的一年:https://www.nanoframework.net/laurent-ellerbach-a-year-deeply-in-net-nanoframework/
边栏推荐
- NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
- 6-5漏洞利用-SSH弱口令破解利用
- 新手找陪驾要注意什么
- 西部数据绿盘、蓝盘、黑盘、红盘和紫盘有什么区别
- [Yugong series] go teaching course 001 in July 2022 - Introduction to go language premise
- RAC delete damaged disk group
- Kivy tutorial 07 component and attribute binding implementation button button click to modify the label component (tutorial includes source code)
- 附件四:攻击方评分标准.docx
- Zhengzhou zhengqingyuan Culture Communication Co., Ltd.: seven marketing skills for small enterprises
- Niuke Xiaobai monthly race 49
猜你喜欢

Kivy教程之 格式化文本 (教程含源码)

Developing mqtt access program under QT

Main applications of TDK lambda power supply

Instructions for LPC interrupt binding under ft2000+

Zhengzhou zhengqingyuan Culture Communication Co., Ltd.: seven marketing skills for small enterprises

I.MX6U-ALPHA开发板(C语言版本LED驱动实验)

Intersection traffic priority, illustration of intersection traffic rules

Apple CMS imitation watermelon video atmospheric response video template source code

附件五:攻击过程简报.docx

A beautiful API document generation tool
随机推荐
How do good test / development programmers practice? Where to go
Experience sharing of epidemic telecommuting | community essay solicitation
Deep understanding of redis -- bloomfilter
Kivy教程之 07 组件和属性绑定实现按钮button点击修改label组件(教程含源码)
新手找陪驾要注意什么
How to view installed r packages in R language
Many founders of technology companies provided enterpriser first with a round C financing of up to US $158million to help it invest in the next generation of global innovators
疫情远程办公经验分享| 社区征文
【安全攻防】序列化与反序列,你了解多少?
Modstartblog modern personal blog system v5.2.0 source code download
红队视角下的防御体系突破之第二篇案例分析
什么是上下文?
附件六:防守工作简报.docx
Wechat brain competition answer applet_ Support the flow main belt with the latest question bank file
Drozer tool
Operate the server remotely more gracefully: the practice of paramiko Library
MySQL JDBC programming
附件五:攻击过程简报.docx
测试 CS4344 立体声DA转换器
Y55. Chapter III kubernetes from entry to proficiency -- HPA controller and metrics server (28)