Arithmetic Problem
I was doing some basic arithmetic operations in my asp.net page until I came across this operation:
393.3 - 54.9 - 14.9 - 29.5 - 299.0 = -4.99999999999994
Can anyone tell me why is it that the result I'm getting shouldn't be -5 instead of -4.99999999999994?
View Replies
I have seven radio buttons that a user might check and the values of the buttons are 0, 1, 2, 3, 4, 5, and 6 for a response. The same variable name is used for each radio button option (bdiq). Let's say that the user might select radio button with the value of 4. Is there a way to "change" the value from a 4 to a 2? This is what I have:
<%
Dim bdiq
Dim bdiqscore
Dim totalscore
totalscore = bdiqscore
if bdiq=4 then bdiqscore=bdiq-2 end if
%>
When I do response.write(bdiqscore), I get the answer of 2, but with totalscore the answer is 4 from the radio button selected.
View Replies
View Related
I got the following error: Arithmetic overflow error converting numeric to data type numeric I'm sure it was one of my currency fields. However, the real total of that
column was $776.92
How did it get submitted as $776.9200000000001 ?
Is there a way I can assure those extra digits get whacked?
View Replies
View Related