logo To Foot
© J R Stockton, ≥ 2007-06-17

JavaScript Demos.

No-Frame * Framed Index * Frame This
Links within this site :-

See "About This JavaScript Site" in JavaScript Index and Introduction.

Maths Demonstrations

I have tested these in MSIE 4 predominantly, and rely on users who find faults to give helpful reports.

Numbers entered must NOT have thousands separators; eval() is used in userIn().

These demonstrations require the "eval" function. Do not give variable names that might be taken as referring to existing objects, fields, or variables (to see why not, try value="" or value="\n\n\n\n" in the first box), unless you specifically want to refer to those items.

The first three respectively use straight evaluation, binary search, and Fibonacci (Golden Ratio) search. Enter thoughtfully.

Do not use this actual page repeatedly; if you like it, make your own private version. For Evaluate, JavaScript/HTML/VBS Quick Trials is shorter. These pages are copyright, and must not be re-published; but you are free to re-implement their concepts.

Evaluate

Give an expression to evaluate (for multiple answers, evaluate an array, e.g. [x, y, z]),
e.g. with (new Date()) getFullYear()+"-"+LZ(getMonth()+1)+"-"+LZ(getDate())
     



To view source of a known one-line function such as LZ, try LZ.toString()
The three controls above are Fm1.EX0, Fm1.EV0, Fm1.Ans0; those below are similar.
To view the source code of a known one-line function Name, try Eval of these :-
  Name.toString()
  Code.value += Name.toString() newline

Find Zero

Give a monotonic expression in X with a zero between Min & Max, e.g. 2*X*X-1

        8 sig figs.

Find Peak

Give an expression F in X with a monotonic peak between Min & Max, e.g. (X-0.3)*(0.8-X)

        8 sig figs.
   

Approximate

Preferred; but not NS6?
Rational Fraction Approximation : Input, via a+1/(b+1/(c+1/(d+ ... )..) to Num/Den
   


For NS6? Does not use Math; but needs SigFigExp()
Rational Fraction Approximation : Input, via a+1/(b+1/(c+1/(d+ ... )..) to Num/Den
   


For NS6? Does not use Math or SigFigExp()
Rational Fraction Approximation : Input, via a+1/(b+1/(c+1/(d+ ... )..) to Num/Den
   

WYSIWYG HTML Editor

Type in this TextArea :- Run     Size
x

Not the usual Wysiwyg! Adapted from code posted by Gernot Frisch.

Script to HTML


      Text area size :   H 3,   W 64.
Home Page
Mail: no HTML
© Dr J R Stockton, near London, UK.
All Rights Reserved.
These pages are tested mainly with MS IE 7 and Firefox 3.0 and W3's Tidy.
This site, http://www.merlyn.demon.co.uk/, is maintained by me.
Head.