Skip to content

Commit 40c4e7a

Browse files
authored
Merge 1.2.1 Development
FIX: Cast float to string to Decimal round correctly, fixes #10
2 parents a07be2b + fac0d5d commit 40c4e7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

labfis/uncertainty.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ def __round__(self, p: int = 0) -> labfloat:
229229
current_contex = getcontext()
230230
setcontext(self.context)
231231

232-
u = Decimal(self._uncertainty)
233-
m = Decimal(self._mean)
232+
u = Decimal(str(self._uncertainty))
233+
m = Decimal(str(self._mean))
234234

235235
r = p - u.adjusted() * (not p)
236236

0 commit comments

Comments
 (0)