User Tools

Site Tools

한국어

logicpython:cubloc_api:fp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

logicpython:cubloc_api:fp [2026/04/10 02:06] – created - external edit 127.0.0.1logicpython:cubloc_api:fp [2026/04/10 04:21] (current) – removed mfranklin
Line 1: Line 1:
-====== FP ====== 
- 
-Format a floating-point number with fixed whole and fractional digit counts. 
- 
-===== Syntax ===== 
- 
-<code python> 
-from cubloc import FP 
- 
-FP(value: float, wholeNumberDigits: int, fractionalNumberDigits: int) 
-</code> 
- 
-===== Parameters ===== 
- 
-  * **value**: Floating-point ''value'' to format. 
-  * **wholeNumberDigits**: Column width for the integer part. 
-  * **fractionalNumberDigits**: Number of digits after the decimal point. 
- 
-===== Return Value ===== 
- 
-Returns a fixed-point string using the requested whole-number and fractional digit counts. 
- 
-===== Exceptions ===== 
- 
-  * [[https://docs.micropython.org/en/latest/library/builtins.html#TypeError|TypeError]]: An argument has an invalid type. 
- 
-===== Example ===== 
- 
-<code python> 
-from cubloc import FP 
- 
-# Example usage 
-result = FP(1, 1, 1) 
-print(result) 
-</code> 
- 
-===== Related APIs ===== 
- 
-  * [[logicpython:cubloc_api:decn|DecN]] 
-  * [[logicpython:cubloc_api:dp|DP]] 
-  * [[logicpython:cubloc_api:float|Float]] 
-  * [[logicpython:cubloc_api:hexn|HexN]] 
-  * [[logicpython:cubloc_api:hp|HP]] 
  
logicpython/cubloc_api/fp.1775786798.txt.gz · Last modified: by 127.0.0.1