Skip to content

Commit 3f5606f

Browse files
committed
Fix description of sign to match the logic found in the constructor
1 parent 14aad5f commit 3f5606f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/decimal/basics.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ constexpr decimal32(T coeff, T2 exp, bool sign = false) noexcept;
2323
Where types `T` and `T2` are integral types (signed and unsigned are both allowed).
2424
Lastly the sign follows the convention of `signbit` where `false` is positive and `true` is negative.
2525
If both a negative coefficient and a sign are passed then the resulting decimal number will be negative.
26-
The final number constructed is in the form (sign ? -1 : 1) x coeff x 10^exp.
26+
The final number constructed is in the form (sign || coeff < 0 ? -1 : 1) x coeff x 10^exp.
2727

2828
[souce, c++]
2929
----

0 commit comments

Comments
 (0)