473,378 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

acos(1.000000) = -1.#IND00 ???

Hi -

I'm computing the angle between pairs of unit vectors as the arc
cosine of the dot product of each pair of vectors. Occasionally, when
the dot product is 1.000000 (output to 6 decimal places) I get the
value -1.#IND00 ! What does this mean?

Thanks,

- Olumide
PS: if it helps, I'm using Visual Studio .NET 2003 on a Windows XP
machine.

Oct 14 '07 #1
3 4549
On 2007-10-14 21:33, Olumide wrote:
Hi -

I'm computing the angle between pairs of unit vectors as the arc
cosine of the dot product of each pair of vectors. Occasionally, when
the dot product is 1.000000 (output to 6 decimal places) I get the
value -1.#IND00 ! What does this mean?
It probably means that one of the decimals that you have not shown is
greater than 1. acos is only defined for values in the range -1 to 1
inclusive, for other values of input a domain error occurs and it is up
to the implementation what will be returned. In VC++ this produces a so
called quiet NaN (Not A Number) which looks like -1.#IND when printed.

--
Erik Wikström
Oct 14 '07 #2
On 2007-10-14 22:13, Erik Wikström wrote:
On 2007-10-14 21:33, Olumide wrote:
>Hi -

I'm computing the angle between pairs of unit vectors as the arc
cosine of the dot product of each pair of vectors. Occasionally, when
the dot product is 1.000000 (output to 6 decimal places) I get the
value -1.#IND00 ! What does this mean?

It probably means that one of the decimals that you have not shown is
greater than 1.
Sorry, that should be "greater than 0".

--
Erik Wikström
Oct 14 '07 #3
On 14 Oct, 21:24, Erik Wikström <Erik-wikst...@telia.comwrote:
On 2007-10-14 22:13, Erik Wikström wrote:
I'm computing the angle between pairs of unit vectors as the arc
cosine of the dot product of each pair of vectors. Occasionally, when
the dot product is 1.000000 (output to 6 decimal places) I get the
value -1.#IND00 ! What does this mean?
It probably means that one of the decimals that you have not shown is
greater than 1.

Sorry, that should be "greater than 0".
Thanks, I should have known that ;-) .

Oct 14 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jean-François Michaud | last post by:
Hello people, I am rather puzzled by this problem I am having with doubles here. The code seems to execute correctly for awhile and then all a sudden printfing out my doubles, I get -1.#IND00...
5
by: billynastie2007 | last post by:
Hi i am writing a balloon race site and i am having problems with some functions to calculate the distance the balloon travels firstly i am reading my info from the database using the fetch assoc...
10
by: ratcharit | last post by:
Currently using cosine function in math.h Currently I get: 1 = cos(1e^-7) Is there another way for cos to return value of high accuracy say: 0.999999 = cos(1e^-7)
16
by: drwyness | last post by:
Hello, Please help with the following problem it is causing me some headaches. The following javascript code is designed to fill in text boxes with numbers on an online game (tribalwars). It...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.