• Convert an OS amount (smallest unit) to a DEM string (human-readable).

    Always returns a string to preserve precision. The result has exactly one decimal point, with trailing fractional zeros trimmed (but at least one fractional digit retained).

    Negative inputs are supported and produce a leading -.

    Parameters

    • os: bigint

      OS amount as bigint.

    Returns string

    DEM amount as decimal string.

    osToDem(1_000_000_000n) // => "1.0"
    
    osToDem(500_000_000n)   // => "0.5"
    
    osToDem(1n)             // => "0.000000001"
    
    osToDem(0n)             // => "0.0"