• Welcome to Valhalla Legends Archive.
 

Math

Started by Adron, December 15, 2005, 01:23 PM

Previous topic - Next topic

MyndFyre

You don't suppose VB uses its own floating-point library from the days that most computers didn't have coprocessors, do you?
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

l2k-Shadow

#16

Sub form_load()
Dim a#, b#, c#, d#
    a = (8000 * 0.3)
    b = 8000 * 3
    c = b / 10
    d = a - c
    Text1.Text = d
    'Answer = 0
End Sub

Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

FrOzeN

Quote from: l2k-Shadow on December 17, 2005, 07:18 PM
I just used

Sub form_load()
Dim a As Double
    a = 8000 * 0.3 - 8000 * 3 / 10
    Text1.Text = a
End Sub

and got -8.88178419700125E-14 .. what's the problem?
The problem is that it returns the wrong answer, it should be 0.
~ FrOzeN

l2k-Shadow

Quote from: FrOzeN on December 17, 2005, 07:22 PM
Quote from: l2k-Shadow on December 17, 2005, 07:18 PM
I just used

Sub form_load()
Dim a As Double
    a = 8000 * 0.3 - 8000 * 3 / 10
    Text1.Text = a
End Sub

and got -8.88178419700125E-14 .. what's the problem?
The problem is that it returns the wrong answer, it should be 0.
Yeah I just realized that, edited my post.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

111787

Question: What order does it do it in?
I cant produce that answer doing it in any order.

Adron

Quote from: 111787 on December 17, 2005, 09:10 PM
Question: What order does it do it in?
I cant produce that answer doing it in any order.

Regular math evaluation order... And copying the expression exactly as I typed it should give the nonzero result.

What I was originally doing was take 30% of an input value, and round it down to the nearest integer, i.e. Fix(x * 0.30), and this turned out to be 2399 for the input 8000. Which I thought was kinda odd...

Tazo

which would be
Parenthesees
Exponents
Multiplication
Division
Addition
Subtraction

rabbit

Quote from: Adron on December 18, 2005, 12:52 AM
Quote from: 111787 on December 17, 2005, 09:10 PM
Question: What order does it do it in?
I cant produce that answer doing it in any order.

Regular math evaluation order... And copying the expression exactly as I typed it should give the nonzero result.

What I was originally doing was take 30% of an input value, and round it down to the nearest integer, i.e. Fix(x * 0.30), and this turned out to be 2399 for the input 8000. Which I thought was kinda odd...
1/3 is 0.333333
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Explicit

Quote from: rabbit on December 18, 2005, 02:39 PM
Quote from: Adron on December 18, 2005, 12:52 AM
Quote from: 111787 on December 17, 2005, 09:10 PM
Question: What order does it do it in?
I cant produce that answer doing it in any order.

Regular math evaluation order... And copying the expression exactly as I typed it should give the nonzero result.

What I was originally doing was take 30% of an input value, and round it down to the nearest integer, i.e. Fix(x * 0.30), and this turned out to be 2399 for the input 8000. Which I thought was kinda odd...
1/3 is 0.333333

Where are you even getting 1/3 from?
I'm awake in the infinite cold.

[13:41:45]<@Fapiko> Why is TehUser asking for wang pictures?
[13:42:03]<@TehUser> I wasn't asking for wang pictures, I was looking at them.
[13:47:40]<@TehUser> Mine's fairly short.

rabbit

I have no clue...I guess I was spacing out..

O well, it was a random fun fact I guess :P
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Explicit

Quote from: rabbit on December 18, 2005, 06:30 PM
I have no clue...I guess I was spacing out..

O well, it was a random fun fact I guess :P

Silly rabbit, fun facts are for kids!  :)
I'm awake in the infinite cold.

[13:41:45]<@Fapiko> Why is TehUser asking for wang pictures?
[13:42:03]<@TehUser> I wasn't asking for wang pictures, I was looking at them.
[13:47:40]<@TehUser> Mine's fairly short.

rabbit

Wow.  That wasn't funny the first time.  Nor the second time.  Why the hell would it be funny the seven hundred twenty first time?
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

iNsaNe

#27
How is this hard. The equation is basically the same on both sides. The rule is PEMDAS stated above, Parenthesis, Exponents, Multiplication OR Division (Left to Right), Addition OR Subtraction(Left to Right).

The original equation: 8000 × 0.3 - 8000 × 3 / 10
- Since PEMDAS goes in order from Multiplication OR division from Left to Right, the "× 3 / 10" means × 0.3

The equation basically says:

= (8000 × 0.3) - (8000 × 0.3)
= 0

Why is it necessary to go in such depth?

l2k-Shadow

Quote from: iNsaNe on March 05, 2006, 04:37 PM
How is this hard. The equation is basically the same on both sides. The rule is PEMDAS stated above, Parenthesis, Exponents, Multiplication OR Division (Left to Right), Addition OR Subtraction(Left to Right).

The original equation: 8000 × 0.3 - 8000 × 3 / 10
- Since PEMDAS goes in order from Multiplication OR division from Left to Right, the "× 3 / 10" means × 0.3

The equation basically says:

= (8000 × 0.3) - (8000 × 0.3)
= 0

Why is it necessary to go in such depth?

don't bring up 1 month+ old topics please
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.