473,388 Members | 1,207 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,388 software developers and data experts.

System.Math.Log10 returning different values on different OS

Hello,

Here is an update.

There is no differences with the function
System.Math.Log10 under any operating system.

The problem is with the casting of the datatype double
and value Infinite to datatype int.

E.g.
double myValue = System.Math.Log10(0d);
// myValue = Infinite
int myIntValue = (int)myValue]
// myIntValue = -2147483648 under Framework 1.1 in
Windows XP Pro
// myIntValue = 0 under Framework 1.1 in Windows NT SP6a
// myIntValue = 3622256 under Framework 2.0 in Windows XP
Pro.

So as you can see there is a bug with casting Infinite to
int.

I've raised it with Microsoft.

Thanks,
-----Original Message-----
In Windows XP
System.Math.Log10(0) returns -2147483648

In Windows NT
System.Math.Log10(0) returns 0.

Does anyone know why?

Thanks,

.

Nov 16 '05 #1
0 1362

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

Similar topics

5
by: Wim Smit | last post by:
I am trying to put the following math formula in php, but I know to little of math to do it I guess, maybe somebody can help me out. This is the formula: x = (-ln(1) - ln(y/100))*100*z The...
17
by: cwdjrxyz | last post by:
Javascript has a very small math function list. However there is no reason that this list can not be extended greatly. Speed is not an issue, unless you nest complicated calculations several levels...
6
by: RobG | last post by:
I am writing a script to move an absolutely positioned element on a page by a factor using style.top & style.left. The amount to move by is always some fraction, so I was tossing up between...
7
by: a.dheeraj.kumar | last post by:
i know that there is a function to find the logarithm of a number, sin, cos, tan etc. but are there which can find sin^-1, cos^-1, tan^-1 and antilog of a given number? PS: sin^-1 means sin...
13
by: Jon Agiato | last post by:
Hello, I am sure this problem is easy to spot but I have been at this project all day and the frustration has finally overcome me. I am using this function in order to produce a standard normal...
3
by: BernsteinVsTheDb | last post by:
Hello all, I have a table that contains 100+ rows. I'm trying to run a query that looks like this: SELECT ..., log10(...) as Rank FROM Table and the resultset contains only the first row of...
8
by: fl1p-fl0p | last post by:
import math math.pow(34564323, 456356) will give math range error. how can i force python to process huge integers without math range error? Any modules i can use possibly?
9
by: Xah Lee | last post by:
REQUIREMENTS FOR A VISUALIZATION SOFTWARE SYSTEM FOR 2010 Xah Lee, 2007-03-16 In this essay, i give a list of requirements that i think is necessary for a software system for creating...
11
by: Joe | last post by:
Hello, I'm using Math.Log10 to get my numbers on the same scale but I'm running into a problem with negative values. Math.Log10(-143.73833558) is returning a NaN. Is there something else I...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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...
0
Oralloy
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.