Nmap Development mailing list archives
Re: [PATCH] Change pow(, 0.5) -> sqrt() in osscan[2].cc
From: Fyodor <fyodor () insecure org>
Date: Sat, 2 Sep 2006 20:23:34 -0700
On Sat, Sep 02, 2006 at 10:17:16PM -0500, Kris Katterjohn wrote:
The attached patch just uses sqrt() instead of pow(,0.5) on everything instead of just Linux in osscan.cc and osscan2.cc. Apparently (judging by the comment in osscan.cc), sqrt() is used on Linux because pow() is broken in some libc versions. sqrt(X) is the same as pow(X,0.5), so we can just use sqrt() and avoid the #ifdef.
Are you sure that sqrt() is portable to all the systems supported by Nmap, including Windows? Cheers, -F _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [PATCH] Change pow(, 0.5) -> sqrt() in osscan[2].cc Kris Katterjohn (Sep 02)
- Re: [PATCH] Change pow(, 0.5) -> sqrt() in osscan[2].cc Fyodor (Sep 02)
- Re: [PATCH] Change pow(, 0.5) -> sqrt() in osscan[2].cc Kris Katterjohn (Sep 02)
- Re: [PATCH] Change pow(, 0.5) -> sqrt() in osscan[2].cc Fyodor (Sep 02)
- Re: [PATCH] Change pow(, 0.5) -> sqrt() in osscan[2].cc Kris Katterjohn (Sep 02)
- Re: [PATCH] Change pow(, 0.5) -> sqrt() in osscan[2].cc Andreas Ericsson (Sep 04)
- Re: [PATCH] Change pow(, 0.5) -> sqrt() in osscan[2].cc Kris Katterjohn (Sep 02)
- Re: [PATCH] Change pow(, 0.5) -> sqrt() in osscan[2].cc Fyodor (Sep 02)