Calculation Methodology, Unit Standards, and Rounding Rules
This page documents how GlucoBP parses inputs, preserves full floating-point precision internally, converts laboratory units, and rounds values only at display time.
Last updated: 2026-11-15
Internal Precision vs Display Rounding
All multi-step calculators keep full IEEE-754 double-precision floating-point values throughout intermediate steps and round only when formatting the final user-visible output. Both the rounded display value and the unrounded equation result are exposed in the calculator output.
Numeric inputs accept standard Western digits (0–9), Arabic-Indic digits (٠–٩), and Eastern Arabic digits (۰–۹), as well as period or single-comma decimal separators. Empty strings, whitespace, NaN, and Infinity are rejected before any formula executes.
Primary Equations & Unit Factors
• HbA1c IFCC ↔ NGSP (S10): NGSP (%) = 0.09148 × IFCC (mmol/mol) + 2.152.
• ADAG eAG (S9): eAG (mg/dL) = 28.7 × A1C (%) − 46.7; glucose molar factor = 18.0182 mg/dL per mmol/L.
• CGM GMI (S11): GMI (%) = 3.31 + 0.02392 × [mean glucose in mg/dL].
• Glucose Variability (S22): Population SD = √[(1/N) Σ(x_i − mean)²]; CV (%) = 100 × SD / mean.
• Adult eGFR (S13): 2021 CKD-EPI race-free creatinine equation restricted to adults aged 18–120 years; creatinine factor = 88.4 µmol/L per mg/dL.
• Spot Urine uACR (S14): Albumin normalized to mg/dL divided by Creatinine normalized to g/dL = mg/g; molar ratio mg/mmol = mg/g × 0.11312.
• Non-HDL Cholesterol: Total Cholesterol − HDL Cholesterol in matching units; cholesterol factor = 38.67 mg/dL per mmol/L.