Im looking to do some heavy geomentry based number crunching involving a lot
of sin and cos calculations.
Performing these operations takes up a lot of computer time, we have
calculated ~100 clock cycles per calculation.
I have come accross approximations such as the "Taylor Series" for working
out the values of these functions. What precision are sin and cos calculated
by the computer? does anyone know how the computer calculates sin and cos ?
(i read a while back there is an efficient binary method, but i lost the
site and the reference to the name of the method). I assume that the
processors tend to have special high speen pipelines for this sort of thing
too ?
If i only want sin and cos calculated to float precision, are there actually
better ways of calculating sin and cos for number crunching applications.
Many thanks for your time
Jon Rea 2 2825
Hi Jon,
Have you think in using a C dll for this? I don't know if you will find a
good and proven math component written in C#, if you application is very
trig. intensive I would strongly advise that you use one library done in C
this this task.
Do a google search and you probably will find several libs like that.
Hope this help,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Jon Rea" <jr****@bris.ac.uk> wrote in message
news:XP*******************@news-binary.blueyonder.co.uk... Im looking to do some heavy geomentry based number crunching involving a
lot of sin and cos calculations.
Performing these operations takes up a lot of computer time, we have calculated ~100 clock cycles per calculation.
I have come accross approximations such as the "Taylor Series" for working out the values of these functions. What precision are sin and cos
calculated by the computer? does anyone know how the computer calculates sin and cos
? (i read a while back there is an efficient binary method, but i lost the site and the reference to the name of the method). I assume that the processors tend to have special high speen pipelines for this sort of
thing too ?
If i only want sin and cos calculated to float precision, are there
actually better ways of calculating sin and cos for number crunching applications.
Many thanks for your time Jon Rea
Hi Jon,
try out http://www.lundin.info/mathparser.asp
Regards
Joubert
"Jon Rea" <jr****@bris.ac.uk> wrote in message
news:XP*******************@news-binary.blueyonder.co.uk... Im looking to do some heavy geomentry based number crunching involving a
lot of sin and cos calculations.
Performing these operations takes up a lot of computer time, we have calculated ~100 clock cycles per calculation.
I have come accross approximations such as the "Taylor Series" for working out the values of these functions. What precision are sin and cos
calculated by the computer? does anyone know how the computer calculates sin and cos
? (i read a while back there is an efficient binary method, but i lost the site and the reference to the name of the method). I assume that the processors tend to have special high speen pipelines for this sort of
thing too ?
If i only want sin and cos calculated to float precision, are there
actually better ways of calculating sin and cos for number crunching applications.
Many thanks for your time Jon Rea
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Cheetah |
last post by:
Does anyone know of some public/open source implementations of Trig funtions
- ie sin, cos, tan - for Java that operate with BigIntegers or BigDecimals.
Even better would be a library which can add vectors. I'm starting with
amplitudes and degrees, and need to add the vectors to come out with a
final vector (amplitude).
This kind of thing...
|
by: Bryan Olson |
last post by:
The current Python standard library provides two cryptographic
hash functions: MD5 and SHA-1 . The authors of MD5 originally
stated:
It is conjectured that it is computationally infeasible to
produce two messages having the same message digest.
That conjecture is false, as demonstrated by Wang, Feng, Lai and
Yu in 2004 . Just recently,...
|
by: John Smith |
last post by:
I just broke up with my girlfriend, so, to sublimate my sexual tensions,
I began reading this:
http://forensics.calcinfo.com/
This guy has developed a method that he uses to determine chip lineage
in old calculators (he needs a girlfriend too). Various chips will
produce various results when you make this calculation:
n =...
|
by: Paul |
last post by:
Hi!
When I add a bound column programatically, like:
BoundColumn bc = new BoundColumn();
bc.DataField = "myField";
bc.SortExpression = "myField";
myGrid.Columns.Add(bc);
the SortCommand event does not trig at all!
|
by: Cary West |
last post by:
Hello all, having a small problem with a trig routine using python math
module. This code is designed to convert geodetic coordinates to lambert
conformal conic coordinates. It implements the formulas found at
http://mathworld.wolfram.com/LambertConformalConicProjection.html . The
problem is that, at least on my machine, the precision is off...
| |
by: Mark Healey |
last post by:
Do the trig functions in math.h work in degrees, radians or what? For
some reason it doesn't say which in "man math.h"
IIRC the arctan of a slope gives the angle. So, shouldn't atanf((float)1)
return 45 or .7something (degrees or radians) instead of some negative
number?
--
Mark Healey
marknews(at)healeyonline(dot)com
|
by: Razii |
last post by:
On Wed, 30 Apr 2008 08:00:38 -0700 (PDT), Isaac Gouy
<igouy2@yahoo.comwrote:
This time I am going to demonstrate a very serious problem with the
shootout site.
The algorithms used by C, C++, and D are BETTER than the Java
versions! What the heck? In some cases Java version is so bad that
it's 10 times slower.
|
by: tracy |
last post by:
Hi, I really need help.
I run this script and error message appeal as below:
drop trigger log_errors_trig;
drop trigger log_errors_trig
ERROR at line 1:
ORA04080: trigger 'LOG_ERRORS-TRIG' does not exist
drop table log_errors_tab;
|
by: Jezternz |
last post by:
Hi.
Ok basicly I am working on something using C# XNA and I cant get my head around it, possibly a simple answer I dont know.
I have a circle with a center point, co-ordinates (0,0).
The Radius could be any amount (we do know what it is though)
I have a point (which can be anywhere - is variable), we do know the co-ordinates but they could...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |