private-octopus / picoquic

Minimal implementation of the QUIC protocol
MIT License
547 stars 161 forks source link

Remove references to sqrt() in tests #1507

Closed huitema closed 1 year ago

huitema commented 1 year ago

Using sqrt() in test evaluations seemed like a good idea, but linking to the math library is apparently an issue on some platform. This PR adds our own implementation of sqrt for uint64_t, removing the dependency on math library. The replacement function is not optimized -- it uses a simple binary search. But it is good enough for tests.

Close #1503

huitema commented 1 year ago

See comment on issue #1503 by @ogkloo: confirmed that does fix it on 20.04.