long double

描述

86Duino 中支援 80-bit 擴展精度 (double extended) 的浮點數型別 long double,double extended 格式的表示範圍從 3.65E−4951 到 1.18E+4932,雖然它並不是被設計用來精確的儲存資料,不過它能減少浮點數在運算時的溢位以及捨入誤差,進而提升浮點運算的精確度,更多的詳細資料請參考 x86 擴展精度格式

範例


long double myVar;
long double sensorCalbrate = 1.117;

語法


long double var = val;

var – 變數名稱
val – 指派給變數的值


語法參考主頁面

本頁由熱血青年 LBU 譯自英文版。

The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.