Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #32802

Re: Javascript seems to be giving different answers on some devices

Newsgroups comp.lang.javascript
Subject Re: Javascript seems to be giving different answers on some devices
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <66c91c1e-3166-49a2-b6a1-13cb1b0aeb4a@googlegroups.com> <XnsA73C9411FE7EEeejj99@194.109.6.166> <d637812a-4429-4b50-89a1-b200bf039773@googlegroups.com>
Date 2017-03-18 15:13 +0100
Message-ID <XnsA73C9AD38306Eeejj99@194.109.6.166> (permalink)

Show all headers | View raw


Tom Adams <tadamsmar@gmail.com> wrote on 18 Mar 2017 in
comp.lang.javascript: 

> I mean all devices should be running the same javascript-script.

Stop thinking in 'devices', concentrate on 'javascript-engines'.
[and possibly on different 'browser-DOMs'.

The same script can be interpreted differently depending on that.

> I am just doing math.

No, you are programming.
 
> The guy sent me a screen shot so I don't think he is confused.

???

> It like the math calculations are giving different answers.

No, your programme on different engines probably acts differently,
because your programme does not consider cross-browser, cross-version, 
cross-engine programming.

> I know these are 
> different engines, but one would think math would work.

Only if correctly interpreted, 'correctly' in the sense of programmed so.

> He also tested on Windows 8 and got the same result.  So he has tested
> 3 different engines (or at least 3 different OSes).
> 
> I tested on Windows 7 and 10

It os about browsers and their javascript-engines, 
not about operating-systems, imho.

> and found no problem.

Well, you posted because you had a problem.

I suggest the difference in outcome is in your code, that acts differently 
on different engines. So your code needs improving upon.

The first thing you do is debug imho. But your pathway to the final 
minimalized code makes that very difficult.

So back up, write a decent Javascript-script that does the job [or at least 
the math-part], you seem to know the required [by you] action.

-- 
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


Thread

Javascript seems to be giving different answers on some devices tadamsmar@gmail.com - 2017-03-18 05:57 -0700
  Re: Javascript seems to be giving different answers on some devices Julio Di Egidio <julio@diegidio.name> - 2017-03-18 06:11 -0700
    Re: Javascript seems to be giving different answers on some devices Tom Adams <tadamsmar@gmail.com> - 2017-03-18 06:50 -0700
  Re: Javascript seems to be giving different answers on some devices "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-03-18 14:33 +0100
    Re: Javascript seems to be giving different answers on some devices Tom Adams <tadamsmar@gmail.com> - 2017-03-18 06:48 -0700
      Re: Javascript seems to be giving different answers on some devices "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-03-18 15:13 +0100
    Re: Javascript seems to be giving different answers on some devices Tom Adams <tadamsmar@gmail.com> - 2017-03-18 06:52 -0700
      Re: Javascript seems to be giving different answers on some devices "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-03-18 14:58 +0100
        Re: Javascript seems to be giving different answers on some devices Tom Adams <tadamsmar@gmail.com> - 2017-03-18 09:08 -0700
          Re: Javascript seems to be giving different answers on some devices "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-03-18 18:34 +0100
            Re: Javascript seems to be giving different answers on some devices Tom Adams <tadamsmar@gmail.com> - 2017-03-18 10:39 -0700
              Re: Javascript seems to be giving different answers on some devices "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-03-18 21:13 +0100

csiph-web