PureBytes Links
Trading Reference Links
|
Jayson,
That's true. Then why did you ask:
> What do you think 1/0 should be?
NaN or Infinity, but not 0.
Mike
--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> and on every calculator you will ever buy.........
>
> Jayson
> -----Original Message-----
> From: Rik Rasmussen [mailto:hrasmussen@x...]
> Sent: Monday, March 03, 2003 6:28 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Re: [Tomasz] 1 / 0 = 0?
>
>
> In Excel 1/0 is an error isn't it?
>
> Rik Rasmussen
> Stock Analyzer mailing list moderator
> http://groups.yahoo.com/group/stockanalyzer/
>
> -----Original Message-----
> From: Jayson [mailto:jcasavant@x...]
> Sent: Monday, March 03, 2003 1:00 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Re: [Tomasz] 1 / 0 = 0?
>
>
> Mike,
>
> What do you think 1/0 should be?
>
> Jayson
> -----Original Message-----
> From: Mike <mik-u@xxxx> [mailto:mik-u@x...]
> Sent: Sunday, March 02, 2003 11:16 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: [Tomasz] 1 / 0 = 0?
>
>
> Sorry, I didn't understand your point.
>
> You wrote:
> >30 divided by 0 = 0
>
> That was exactly my question: why 1 / 0 (or 30 / 0) = 0?
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso"
<ajf1111@xxxx>
> wrote:
> > Mike,
> >
> > From the Help manual:
> >
> > Operator precedence and the parentheses
> > AFL supports parentheses in formulas.
> > Parentheses can be used to control the operation precedence (the
> order in
> > which the operators are calculated). AmiBroker always does
> operations within
> > the innermost parentheses first. When parentheses are not used,
the
> > precedence is as follows (higher precedence listed first):
> > NoSymbolMeaning
> > 1^Exponentiation
> > 2-Negation - Unary minus
> > 3*Multiplication
> > 4/Division
> > 5+Addition
> > 6-Subtraction
> > 7<Less than
> > 8>Greater than
> > 9<= Less than or equal to
> > 10>=Greater than or equal to
> > 11==Equal to
> > 12!=Not equal to
> > 13&Bit-wise "And" (AFL 2.1+)
> > 14|Bit-wise "Or" (AFL 2.1+)
> > 15NOTLogical "Not"
> > 16ANDLogical "And"
> > 17ORLogical "Or"
> > 18=Variable assignment operator
> >
> >
> > So....lets breakdown your formula.....
> >
> >
> > x=100 - 100 / (1 + 30 / 0);
> > Filter=1;
> > AddColumn(x,"");//Original formula
> > AddColumn((1 + 30 / 0),"");//Parenthesis get executed first and
> Division
> > before addition..so...30 divided by 0 = 0 ...1 + 0 = 1
> > AddColumn(100 / (1 + 30 / 0),"");//100 divided by 1 = 100
> > AddColumn(100-100,"");//100 - 100 = 0
> >
> > Anthony
> > -------Original Message-------
> >
> > From: amibroker@xxxxxxxxxxxxxxx
> > Date: Sunday, March 02, 2003 22:00:48
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] [Tomasz] 1 / 0 = 0?
> >
> > Tomasz,
> >
> > AB returning 0 for an expression like 1 / 0. Is it correct?
> >
> > The following expression
> >
> > 100 - 100 / (1 + 30 / 0)
> >
> > is equal 0 in AB, but I think it should be equal 100.
> >
> > Thanks,
> > Mike
> >
> >
> > Yahoo! Groups Sponsor
> > ADVERTISEMENT
> >
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > --------------------------------------------
> > Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq
> > html
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|