diff --git a/lib/koans/03_numbers.ex b/lib/koans/03_numbers.ex index 9fb3ab23..f3cda976 100644 --- a/lib/koans/03_numbers.ex +++ b/lib/koans/03_numbers.ex @@ -109,6 +109,10 @@ defmodule Numbers do assert Float.round(-5.5674, 3) === ___ end + koan "But beware of floating dragons" do + assert Float.round(2.675, 2) == ___ + end + koan "I want the first and last in the range" do first..last = Range.new(1, 10) diff --git a/test/koans/numbers_koans_test.exs b/test/koans/numbers_koans_test.exs index a56b98a1..ece04f5e 100644 --- a/test/koans/numbers_koans_test.exs +++ b/test/koans/numbers_koans_test.exs @@ -28,6 +28,7 @@ defmodule NumbersTests do 99.0, 12.34, {:multiple, [6.0, 5.0, 8.9, -5.567]}, + 2.67, {:multiple, [1, 10]}, {:multiple, [true, true, false]}, {:multiple, [true, false]}