09-07-2013 01:14 PM
"You are basically measuring the debugging overhead" ... hummm, It's possible, I don't say "no".
When you will have free time, I would be very interested to see how you could solve this, really.
10-03-2013 10:18 AM
Dear All,
How can I do teh same thing in reverse. I mean what should I do to get back those numeric values ( encircled in black ) by just providing a DBL number ( encircled in red ).
Regards.
10-03-2013 11:22 AM
Typecast the double to an array of I16, then you have your bytes, though you still have to reverse the manipulation you've done in between.
/Y
10-03-2013 01:24 PM
First I need to find the log of base 2 and then add it with 127 to find the biased exponent which I have successfuly achived ( not so difficult though ). I feed the value 0.1 and exponent comes out to be -4 and biased will be 123 (127-4). Since I also need to find mantissa. The corresponding code in visual basic to find mantissa is:
Mantissa = 1
MantissaString = ""
absfloat = Abs(float)
For ctr = 1 To 23
MantissaTemp = Mantissa + 2 ^ -ctr
If MantissaTemp * 2 ^ Exponent <= absfloat Then
MantissaString = MantissaString + "1"
Mantissa = MantissaTemp
Else
MantissaString = MantissaString + "0"
End If
Next ctr
This is a similar to the way that you convert an integer from decimal to binary. You just go through checking each digit to see if it makes the value less than or greater than the value you're trying to approximate. Here's the code that I use. Remember that the 1 before the decimal point is implied for the significand. I should also add that what I refer to as Mantissa and MantissaTemp below are actually the significand, and only MantissaString refers to the actual mantissa.
Regards.
10-04-2013 10:33 AM
Hey Nap,
Did you end up figuring it out?
10-04-2013 12:58 PM
Hi ouadji!
I did a benchmark of the two .VIs shown in message 15 (Boolean) and message 17 (non-Boolean)
and here's what I get for "allow debugging: ON" and "allow debugging: OFF"
Regards,
Alex
10-05-2013 04:32 AM
Dear Fox,
NOPE!
Regards.
10-05-2013 04:54 AM
I need a solution, not here to see grand prix of functions executions.
Regards,
10-05-2013 05:10 AM
You have a VI for forward conversion, and you have the VB code, so what's the issue? You dont find the 2log(x) in LV?
/Y
10-05-2013 06:48 AM
I was able to find the Log(x) but the rest of the part I couldn't figure out. I am still on the verge of figuring it out myself. Meanwhile if someone could come up with solution I will appreciate it. 🙂
Regards.