steph1111 / PRECISE

Precision Rules Enforced Calculations In Scientific Environments
Other
0 stars 0 forks source link

sig_float: Add .latex() function to format the numbers #30

Closed steph1111 closed 1 year ago

steph1111 commented 1 year ago

See discussion

schrodinstein commented 1 year ago

Replied

steph1111 commented 1 year ago

This is working well 0.08206 \; L \cdot atm \cdot mol^{-1} \cdot K^{-1}

steph1111 commented 1 year ago

Units in the denominator but not numerator:

f = sig_float("300.0", {"s":-1})
print(f.latex(format=2))
300.0\frac{}{s}
steph1111 commented 1 year ago
f = sig_float("300.0", {"s":-1})
print(f.latex(format=2))
print(f.latex(format=1))
300.0 \frac {1}{s}
300.0 \; s^{-1}
steph1111 commented 1 year ago

Updated implicated of latex(), It works well now