|
Hello everyone,
In my knowledge, float could only be represented by 7 decimal bits. But why in debugger, I can see more than 7 decimal bits?
(in my sample, Result2 is of 9 bits, other than 7, why?)
float TotalBonus = 199.321F;
float Worker1 = 100F;
float Worker2 = 300F;
float Result1 = TotalBonus * Worker1 / (Worker1 + Worker2);
float Result2 = TotalBonus * Worker2 / (Worker1 + Worker2);
thanks in advance,
George
|
|
|
|
|
Float is 32 bits and double is 64 bits.
|
|
|
|
|
Hi Alan,
I mean Decimal bits. Or precisely, decimal digits. Any ideas?
regards,
George
|
|
|
|
|
|
Hi Colin,
I read the link 2 months before, but I do not think it answers my specific question. In more precise, I do not think float has enough significand to represent 9 decimal digits, it has only 7.
Any comments?
regards,
George
|
|
|
|
|
Possibly the answer is here [^]:
By default, a Single value contains only 7 decimal digits of precision, although a maximum of 9 digits is maintained internally
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Thanks CPallini,
Good to see you again. I am confused what means "internally" -- what debugger shows? Any definitions for the term?
regards,
George
|
|
|
|
|
Is that from the IEEE spec, or an artifact of x86 implementing 754 by keeping extra digits as the cheapest way to maintain the needed precision.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
When i call FolderBrowserDialog.ShowDialog() - i see that the FolderBrowserDialog appear in the right corner of the screen.
I want to control on the appear position of this Dialog - but i don't know how.
I want to set the position in the middle of the screen.
Thanks.
|
|
|
|
|
I have created a Bar chart. Where On x axis I need to show labels retrieved from database..
But as the no of labels from database increases, Bar chart started to drop some labels , and show only few .....
How to solve the proble... As I needed to take data dynamically to plot on Chart... Is it a sizing problem ?
My code snippet:
double[] y= { some data}
BarItem myBar = myPane.AddBar("Sales Analysis", Null,y ,Color.Red);
string[] x = {some labels }
myPane.XAxis.MajorTic.IsBetweenLabels = true;
myPane.XAxis.Scale.TextLabels = x;
myPane.XAxis.Type = AxisType.Text;
Any help would be appriciated.
Thanks.
|
|
|
|
|
Hi,
I am creating a meeting request using the smtpmail message and sending it through smtp client. It working fine for meeting invite and meeting update. But when I send a cancel meeting request it is going as an update meeting request on the lotus notes ( working fine with the outlook) instead of a cancellation of meeting request.
Please help me.
Thanks in Advance
Alok...
|
|
|
|
|
Hi,
Can you post or send an email of the code - how to send meeting request using smtpmail message and sending it through smtp client. Even i have same requirement in my project.
It is urgent so kindly send me as soon as possible.
Thanks in advance.
With Regards,
vmtv
|
|
|
|
|
Hi,
Can provide the code for doing this task. Thanks in advance
Mathew
|
|
|
|
|
Can you recommend a case study source for ASP.NET 3.5 and AJAX please?
I would like to start going through a sample project from start to finish with the mentioned skills.
Thanks
|
|
|
|
|
|
* knock * knock *
brain test.
nope, thought not.
|
|
|
|
|
Hi,
i've got a Dll and a Header in c
this is Function From The Header :
const char* __cdecl GetFieldDescription(const char* sFileName, short iMessageIndex, short iFieldIndex);
Ho do i Declare it using C# , i've Tried :
private static extern StringBuilder GetFieldDescription(string sFileName, short iMessageIndex, short iFieldIndex);
When I Call The Function I keep Getting an Exception:
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Where Do I Go Wrong?
Have Fun
Never forget it
modified on Wednesday, June 18, 2008 7:03 AM
|
|
|
|
|
A few guesses: 1. When the function returns, it attempts to write the char*, which goes into a StringBuilder object, which is protected memory.
2. Ditto for the first parameter. Also string is not the same as char* for two reasons: a) char* uses 8-bit chars and C#'s string uses 16-bit chars, and b) C#'s string is preceded by an integer length. I think a C# string is the same as a C++ BSTR. There are C++/Microsoft functions for converting to/from a BSTR.
|
|
|
|
|
Thanks
Have Fun
Never forget it
|
|
|
|
|
Hello...
I'm using remoting function to connect between client and server.
Are there any possibilities to connect one client to many servers ?
If yes, are there any sample for that ?
Thx...
|
|
|
|
|
hi
I think its possible.if you use two different Sockets you can connect to two different Servers.
Regards
Joe
|
|
|
|
|
Hi,
This is embarassing to ask, but I just can't figure it out. Why is it that when I run my application by double-clicking the .exe from windows explorer, it will load but it will stay behind the windows explorer window?
I think the problem lies on the splash screen which I call from the Main Form's constructor. I am calling it here because the splash screen displays the progress of the application start-up ("Initializing components...", "Loading user settings...", etc.) at the bottom of the splash screen.
After this closes, I then do a this.Activate() or this.Focus() in the Main Form's constructor.
What is wrong? :-s
Rafferty
|
|
|
|
|
Post some more code.
How are your loading, showing and closing your splash screen?
What does the apps entry point look like? (The "static void Main()" bit in Program.cs. There should be a line that says something like "Application.Run(new YourForm());")
Simon
|
|
|
|
|
This is going to sound sarcastic but it's not meant to Have you tried the BringToFront method for the form?
|
|
|
|
|
Can you try with
this.WindowState = FormWindowState.Normal
Software - Bundle of bugs covered with features.
|
|
|
|