Template talk:Sqri

From Meta, a Wikimedia project coordination wiki

{{subst:sqri|5}} gives

  • {{subst:#ifexpr:1|{{subst:sqri|5|1}}<br>|{{{2}}}}}

This and also

  • {{subst:#if:1|{{subst:sqri|5}}}}

gives in one edit:

2.2360679775
2.23606889564
2.2380952381
2.33333333333
3
1

Maximum value of argument:

  • {{subst:#if:1|{{subst:sqri|1999999999997}}}} gives:

1414213.56237
1414213.56251
1414233.48697
1421740.52882
1567843.68171
2244699.5085
3987879.3281
7716576.35729
15302454.7295
30539420.3313
61046078.5255
122075773.784
244143355.659
488282615.329
976563182.66
1953125341.32
3906250170.65
7812500085.3
15625000042.6
31250000021.2
62500000010.5
125000000005
250000000002
500000000000
999999999999
1

  • {{subst:#if:1|{{subst:sqri|1999999999998}}}} gives:

Expression error: Unrecognised word "e"
1

Minimum value of argument:

  • {{subst:#if:1|{{subst:sqri|.00000001000000000000001}}}} gives:

0.000100000000001
0.000100000406112
0.000100285401972
0.000107845947507
0.000148228473354
0.000257643647407
0.000495088902253
0.00097997344638
0.00195483136198
0.00390710328304
0.00781292663598
0.0156252132807
0.0312501065624
0.062500053125
0.12500002625
0.2500000125
0.500000005
1

  • {{subst:#if:1|{{subst:sqri|.000000010000000000000001}}}} gives:

Expression error: Unrecognised word "e"
0.000100000000001
0.000100000406112
0.000100285401972
0.000107845947507
0.000148228473354
0.000257643647407
0.000495088902253
0.00097997344638
0.00195483136198
0.00390710328304
0.00781292663598
0.0156252132807
0.0312501065624
0.062500053125
0.12500002625
0.2500000125
0.500000005
1

(due to rounding errors {{#expr:.000000010000000000000001/0.000100000000001/2+0.000100000000001/2}} gives 0.0001 [1] in scientific notation, even though it is slightly greater than 1e-4)

  • {{subst:#if:1|{{subst:sqri|.00000001}}}} gives:

Expression error: Unrecognised word "e"
0.000100000000001
0.000100000406112
0.000100285401972
0.000107845947507
0.000148228473354
0.000257643647407
0.000495088902253
0.00097997344638
0.00195483136198
0.00390710328304
0.00781292663598
0.0156252132807
0.0312501065624
0.062500053125
0.12500002625
0.2500000125
0.500000005
1

Square root templates[edit]

  • Template:Square root - one step at each save
  • Template:Square root A - with absolute error stop criterion, one or two saves produce all approximations and the differences between consecutive ones
  • Template:Square root B - with absolute error stop criterion, one or two saves produce the final approximation and the differences between consecutive ones
  • Template:Sqr - one or two saves produce the final approximation, with fixed stop criterion of relative error <1e-11 (based on use of a server with 12-digit results); gives a single value, a call can be put in an expression
  • Template:Sqri - one or two saves produce all intermediate results and the final approximation at the top (so backward), with fixed stop criterion of relative error <1e-11 (based on use of a server with 12-digit results)
  • Template:Sqrif - ditto, forward
  • Template:Square root with defaults
  • Template:Square root with defaults A

See also: