                     x.toFixed(fractionalSize)
         else
             Math.round(x).toString(radix)
+    isNegative = s[0] == "-"
+    if s[0] == "+" or s[0] == "-" then s = s.remove(0)
     do =>
         pos = s.indexOf(".")
         rawIntegerSize = if pos == -1 then s.length else pos

        # ]====================
        if pos == -1 and fractionalSize > 0 then s += "."
        s = "0".repeat(integerMissing) + s + "0".repeat(Math.max(fractionalMissing, 0))
        if forcesSign and s[0] != "-" then s = "+" + s
    if integerGroupEnabled or fractionalGroupEnabled then do =>
        pos = s.indexOf(".")
        # All these inserts must be from bottom to top, otherwise it will be harder

            .forEach((i) => s = s.insert(i, fractionalGroupSeparator))
        if integerGroupEnabled
            integerStart = (if pos == -1 then s.length else pos) - integerGroupSize
            (i for i in [integerStart..1] by -integerGroupSize)
            .forEach((i) => s = s.insert(i, integerGroupSeparator))
        # ]====================
    if forcesSign
        if isNegative
            s = "-" + s
        else
            s = "+" + s
    else
        if isNegative
            s = "-" + s
    s
