Skip to content

Latex number formatting #25

@mocquin

Description

@mocquin
from physipy import units, m
W = units["W"]

x = 61685027506808.49 * W/m**2
print(x.value)          # 61685027506808.49
print(x)                # 61685027506808.49 kg/s**3
print(x._repr_latex_()) # $61700000000000.0\,\frac{kg}{s^{3}}$
x # in notebook this shows the rendered latex, using 61700000000000 as base value

The latex number formatting applies some rounding that doesn't seem smart

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