# behavior test: use expectApproxEqAbs instead of expectEqual · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/dc62dde9826a94c161e20bf56e23940dc3f2f0dc)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: dc62dde9826a94c161e20bf56e23940dc3f2f0dc

Requested commit: dc62dde9826a94c161e20bf56e23940dc3f2f0dc

Commit: dc62dde9826a94c161e20bf56e23940dc3f2f0dc

Tree: 0d988423f5b22de5e7c98425d633eb385483b538

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
behavior test: use expectApproxEqAbs instead of expectEqual

This is to account for the small differences in math functions of
different libcs. For example, if the compiler links against glibc,
but the target is musl libc, then these values might be
slightly different.

Arguably, this is a bug in the compiler because comptime should
emulate the target, including rounding errors in libc math
functions. However that behavior is not what this particular test
is intended to cover.

```

## Parents

- [758ec9bdd4585b28f50cb7beb01b1cfc4e3cf1a9](https://git.cafe/gitcafe/zig/commit/758ec9bdd4585b28f50cb7beb01b1cfc4e3cf1a9?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/dc62dde9826a94c161e20bf56e23940dc3f2f0dc?format=markdown)
