On Fri, 28 Apr 2006, Rick Niles wrote:
> Forgive me if it's already in the kernel somewhere, but I need some basic (large) integer based math functions for a GPS device driver I maintain (OSGPS on sourceforge)and I've got to wonder if other drivers might be able use them. Right now we have: sqrt(x), atan2(y, x), and rss(x,y) [root-sum-squared]. The functions just deal with large integers to compute anything reasonable. Of course they're approximations since the output has to be an integer. The atan2() function returns an angle such that 1 radian == 16384. It seems like these should go in some integer math kernel header file for everyone to use.
>
> I know what some of you are thinking right now. That sort of math belongs in userspace, but to close a correlator tracking loop in real-time you need it in the device driver. Either than or require your userland program be a real-time program, which I'd rather not do.
>
> They're all less than 30 lines long. If people think this is a good idea, then I can submit a patch. Suggestions about what to call this header file or where to put it are appreciated. Also, if anyone wants to add more functions or improve the algorithm we use that would also be nice.
> -
I like it /usr/src/linux-`uname-r`/lib/math might be a good place for
that stuff. It needs to be enabled/disabled with the standard configure
script so it won't be real easy. It also should work on 64-bit systems.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.4 on an i686 machine (5592.89 BogoMips).
New book: http://www.lymanschool.com
_
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to [email protected] - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]