Re: sin()/cos()/tan() for kernel code? '_ 'a



Quoting Stephen Montgomery-Smith <stephen@xxxxxxxxxxxxxxxxx> (from Sun, 11 Feb 2007 12:00:12 -0600 (CST)):



On Sun, 11 Feb 2007, Stephen Montgomery-Smith wrote:



On Sun, 11 Feb 2007, Daniel Eischen wrote:

Can't you do this in userland? Teach moused?

Since you will only need sin and cos evaluated to the nearest degree, if that, I suggest a simple look up table. There is also something called the CORDIC method, I think, but I suspect that the look up table will be so much easier to program, and negligable extra space overhead.

Stephen

And if you do need more accuracy than the nearest degree, the formulae

sin(x+h) = sin(x) + h cos(x);
cos(x+h) = cos(x) - h sin(x)

for small h (say |h| less than half a degree) should provide way more
accuracy than you should need.

There's work underway which moves the hard work of the mouse drivers from the kernel to moused. The kernel just has a simple hardware interface there, and the real interpretion of all the stuff from the mouse happens in the userland.

See http://www.semicomplete.com/projects/newpsm/ for more.

So maybe it would be better to implement this in moused right from the beginning...

Bye,
Alexander.

--
Love is never asking why?

http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • [2.6 patch] remove two obsolete HFS docs
    ... and Changelog there are definitely too outdated to be useful for anyone. ... You will need the following to compile and use this release of hfs_fs: ... + o The kernel sources available online. ... -1999-04-12 a sun ...
    (Linux-Kernel)
  • (no subject)
    ... Sun has a very detailed "System Test and Performance Regression Test ... directly into kernel space; Solaris changed a kernel ... >of the 8_Recommended patch set. ...
    (SunManagers)
  • SUMMARY: bad patches
    ... Sun has a very detailed "System Test and Performance Regression Test ... directly into kernel space; Solaris changed a kernel ... >of the 8_Recommended patch set. ...
    (SunManagers)
  • Re: 2.6.9-rc2-mm2
    ... Copyright 2002 Sun Microsystems, Inc. ... PROMLIB: Sun IEEE Boot Prom 3.2.30 2002/10/25 14:03 ... Remapping the kernel... ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Oracle Selects Sun As Reference Platform ... again
    ... decided to drop Linux as a reference platform, at least in the 64 bit space, and once again embrace Sun Microsystems. ... the Commerical UNIX space, with technologies like ZFS, Zones, & dtrace ... many kernel, driver, and application bugs its just riduclous. ...
    (comp.databases.oracle.server)