digitalmars.D.bugs - [Issue 14842] New: [REG 2.068-b2] approxEqual does not work with
- via Digitalmars-d-bugs (42/42) Jul 28 2015 https://issues.dlang.org/show_bug.cgi?id=14842
https://issues.dlang.org/show_bug.cgi?id=14842 Issue ID: 14842 Summary: [REG 2.068-b2] approxEqual does not work with integers Product: D Version: D2 Hardware: x86_64 OS: FreeBSD Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: swamplobo gmail.com This works with dmd2.067.1 but with 2.068-b2 I get the errors shown below. Test code: --- void main() { int a = 10; assert(approxEqual(10, a)); } --- Errors: src/phobos/std/math.d(6718): Error: std.math.fabs called with argument types (int) matches both: src/phobos/std/math.d(3415): std.math.fabs(real x) and: /src/phobos/std/math.d(3421): std.math.fabs(float x) /src/phobos/std/math.d(6725): Error: std.math.fabs called with argument types (int) matches both: /src/phobos/std/math.d(3415): std.math.fabs(real x) and: /src/phobos/std/math.d(3421): std.math.fabs(float x) /src/phobos/std/math.d(6726): Error: std.math.fabs called with argument types (int) matches both: /src/phobos/std/math.d(3415): std.math.fabs(real x) and: /src/phobos/std/math.d(3421): std.math.fabs(float x) /src/phobos/std/math.d(6736): Error: template instance std.math.approxEqual!(int, int, double) error instantiating hack.d(13): instantiated from here: approxEqual!(int, int) Failed: ["dmd", "-v", "-o-", "hack.d", "-I."] --
Jul 28 2015