summaryrefslogtreecommitdiffhomepage
path: root/c.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'c.html.markdown')
-rw-r--r--c.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/c.html.markdown b/c.html.markdown
index d3f20eda..e2e15620 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -183,8 +183,8 @@ int main() {
i1 / i2; // => 0 (0.5, but truncated towards 0)
// You need to cast at least one integer to float to get a floating-point result
- (float)i1 / i2 // => 0.5f
- i1 / (double)i2 // => 0.5 // Same with double
+ (float)i1 / i2; // => 0.5f
+ i1 / (double)i2; // => 0.5 // Same with double
f1 / f2; // => 0.5, plus or minus epsilon
// Floating-point numbers and calculations are not exact