Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #23728
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: Expresson evaluation in javascript |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | (1 earlier) <533207f1$0$4217$9b4e6d93@newsspool2.arcor-online.net> <18bbc7cb-380c-438b-a5b6-285bd94fafd9@googlegroups.com> <f63e0028-4084-43f5-9b49-43c1df692351@googlegroups.com> <3t9bj99pnkfho00kc5oraphmajc8m9em8o@4ax.com> <a4cd2804-db95-4cab-9f2b-c9b56206d4ca@googlegroups.com> |
| Date | 2014-03-28 18:33 +0100 |
| Message-ID | <XnsA2FEBCBAAD36Beejj99@194.109.133.133> (permalink) |
jonas.thornvall@gmail.com wrote on 28 mrt 2014 in comp.lang.javascript:
> It seem it actually does some part +-*/ in correct order at least with
> the few operands i've tried, but i do not think it do powers.. At least
> i can not get it to evaluate 2^2+1
^ is the bitwise xor operator,
works fine here:
eval('2^2+1') gives: 1
You might think the power operator being more important,
methinks not.
===============================
This has noting to do with eval() as such, as:
alert( 2^2+1 ) gives: 1
===============================
try:
var result = Math.pow(base, exponent);
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Expresson evaluation in javascript jonas.thornvall@gmail.com - 2014-03-25 11:24 -0700
Re: Expresson evaluation in javascript jonas.thornvall@gmail.com - 2014-03-25 11:43 -0700
Re: Expresson evaluation in javascript jonas.thornvall@gmail.com - 2014-03-25 11:44 -0700
Re: Expresson evaluation in javascript Danny <dann90038@gmail.com> - 2014-03-25 14:04 -0700
Re: Expresson evaluation in javascript Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2014-03-25 18:40 -0300
Re: Expresson evaluation in javascript Christoph Michael Becker <cmbecker69@arcor.de> - 2014-03-25 23:49 +0100
Re: Expresson evaluation in javascript jonas.thornvall@gmail.com - 2014-03-25 22:43 -0700
Re: Expresson evaluation in javascript jonas.thornvall@gmail.com - 2014-03-25 23:29 -0700
Re: Expresson evaluation in javascript Jim T. <x@y.z> - 2014-03-28 11:48 -0500
Re: Expresson evaluation in javascript jonas.thornvall@gmail.com - 2014-03-28 10:03 -0700
Re: Expresson evaluation in javascript Jim T. <x@y.z> - 2014-03-28 13:12 -0500
Re: Expresson evaluation in javascript "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-28 18:33 +0100
Re: Expresson evaluation in javascript jonas.thornvall@gmail.com - 2014-03-28 10:50 -0700
Re: Expresson evaluation in javascript jonas.thornvall@gmail.com - 2014-03-28 10:59 -0700
Re: Expresson evaluation in javascript "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-28 20:38 +0100
Re: Expresson evaluation in javascript "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-29 19:49 -0700
Re: Expresson evaluation in javascript Ed Jay <edMbj@aes-intl.com> - 2014-03-29 10:53 -0700
Re: Expresson evaluation in javascript "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-29 19:45 -0700
Re: Expresson evaluation in javascript jonas.thornvall@gmail.com - 2014-03-30 09:21 -0700
Re: Expresson evaluation in javascript jonas.thornvall@gmail.com - 2014-03-30 09:24 -0700
Re: Expresson evaluation in javascript "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-30 21:19 +0200
Re: Expresson evaluation in javascript "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-30 14:20 -0700
Re: Expresson evaluation in javascript John Harris <niam@jghnorth.org.uk.invalid> - 2014-03-26 14:58 +0000
Re: Expresson evaluation in javascript "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-29 19:33 -0700
Re: Expresson evaluation in javascript Norman Peelman <npeelman@cfl.rr.com> - 2014-03-30 05:01 -0400
csiph-web