Skip to content

Confidence intervals override rounding digits #87

Description

@Ants-Aare
#num(digits:1 round:(precision:1))[20+-0.200000000000]

this displays with a dozen zeroes after the decimal point, I'd expect it to display as 20.0 +- 0.2 I'm creating these confidence interval values using a function and don't want to manually do calc.round(0.20000000, digits:2) as that kind of defeats the purpose. Just let me set the amount of significant digits.

#num(digits:2, round:(precision:2, mode:"uncertainty"))[20+-0.065333333333333333]\
#num(digits:2, round:(precision: 2, mode:"uncertainty"))[20+-0.23556268333031394]

the only way I’ve found to do this is to set mode to “uncertainty” but then the number is still inconsistent. the first renders as 20.000+-0.065 and the second as 20.00+-0.24 why do they have different amounts of digits with the same settings of 2 digits? I would expect them to be the same with the first rounded to 0.07 and the second to 0.24 this is really annoying when in a table.

#num(digits:2, round:(precision:1, mode:"uncertainty"))[20+-0.065333333333333333]\
#num(digits:2, round:(precision: 1, mode:"uncertainty"))[20+-0.23556268333031394]

I can set the precision to 1 but then both have the same amount of digits, but the second value is shown as 20.00+-0.20 instead of 20.00+-0.24.

ideally I’d just set round to precision:2 without any additional settings and be done with it, but then it's showing way too many digits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions