Skip to content

Commit 6c87e27

Browse files
committed
Inline arithmetic example in documentation page
1 parent 097bf7e commit 6c87e27

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/modules/ROOT/pages/examples.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,21 @@ Wolfram Alpha sqrt(2): 1.414213562373095
5454
....
5555
====
5656
57+
[#examples_math_results]
58+
.This https://github.com/cppalliance/decimal/blob/develop/examples/addition.cpp[example] shows the differences in arithmetic results between decimal floating point and binary floating point
59+
====
60+
[source,c++]
61+
----
62+
include::example$addition.cpp[]
63+
----
64+
65+
.Expected Output:
66+
....
67+
Decimal Result: 100
68+
Float Result: 99.999
69+
....
70+
====
71+
5772
[#examples_promotion]
5873
== Promotion and Mixed Decimal Arithmetic
5974

0 commit comments

Comments
 (0)