Square root

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Calculate floating-point (IEEE 754) square-roots ofgiven numbers (decimal,hexadecimal,nan,inf),
and show result as printf "%.9f" format.

Options

exec is denied

no deadline, the server will not save your submission

Sample input:_

2
3
4
5
6
7
8
9
10

Sample output:

1.414213562
1.732050808
2.000000000
2.236067977
2.449489743
2.645751311
2.828427125
3.000000000
3.162277660

Sample input:_

0
NaN
3.14159265
-1
18
0x123
0x123.fed
127020

Sample output:

0.000000000
nan
1.772453850
nan
4.242640687
17.058722109
17.087871761
356.398653196

Sample input:_

2
3
+inf
-inf
12345
-0
+0
-0.00
81

Sample output:

1.414213562
1.732050808
inf
nan
111.108055514
-0.000000000
0.000000000
-0.000000000
9.000000000

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid840.06502012/02/27 02:02:550B / ?B / ?B
2o___o850.14002008/03/03 18:55:090B / ?B / ?B
3murky-satyr850.05592008/08/13 02:07:100B / 43B / 40B
4eban860.23852007/03/04 02:04:200B / 38B / 46B
5shinh870.55292007/02/12 14:18:53?B / ?B / ?B
6usa880.22032007/02/10 05:42:12?B / ?B / ?B
7tabasa3960.08392007/09/29 23:48:4925B / 205B / 135B

Perl _

RankUserSizeTimeDateStatistics
1teebee590.04772012/02/27 17:12:240B / 28B / 30B
2leonid590.04722012/02/27 20:19:330B / 28B / 30B
3nonstrict620.65562007/02/21 08:24:320B / ?B / ?B
4sugarfree680.13502007/02/28 01:31:000B / ?B / ?B
5dankogai690.46432007/02/10 04:40:06?B / ?B / ?B
6skyvan780.08432008/02/27 05:37:000B / ?B / ?B
7ott800.03732008/05/24 07:13:560B / 42B / 36B

Python _

RankUserSizeTimeDateStatistics
1twobit940.09202014/01/29 10:54:160B / 57B / 34B
2hallvabo1000.10662014/01/29 10:44:380B / 45B / 55B
3mskzzz1030.34052007/04/15 21:05:110B / 71B / 20B
4starmie1070.09432015/02/11 17:09:550B / 74B / 29B
5mft1210.36982007/02/14 02:49:09?B / ?B / ?B
63910.10402014/12/12 14:05:090B / ?B / ?B

Python3 _

RankUserSizeTimeDateStatistics
1mypetlion890.11872019/12/17 09:06:290B / 54B / 31B

PHP _

RankUserSizeTimeDateStatistics
1o-cn1340.01792009/12/02 20:16:3312B / 63B / 59B
2tarhashi3410.38842008/10/03 10:20:451B / ?B / ?B
3test3560.41372008/10/03 10:15:560B / ?B / ?B

Scheme _

RankUserSizeTimeDateStatistics
1ma(this_problem_sucks)3320.20022007/03/03 12:13:120B / ?B / ?B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima2130.37172007/10/02 14:39:080B / ?B / ?B

Arc _

RankUserSizeTimeDateStatistics
1youz14012.32422009/10/26 23:20:560B / 80B / 55B

JavaScript _

RankUserSizeTimeDateStatistics
1nn1000.09452008/05/14 12:02:030B / 59B / 41B
2murky-satyr1000.08922008/08/13 02:14:340B / 54B / 46B
3ETHproductions1190.05292017/03/30 01:51:230B / 73B / 46B
4Dashiva1240.14062007/04/20 13:24:070B / 67B / 57B
5Tomac2090.00642011/09/27 15:26:120B / ?B / ?B

Lua _

RankUserSizeTimeDateStatistics
1planque570.10742007/06/05 20:41:520B / 38B / 17B

Smalltalk _

RankUserSizeTimeDateStatistics
1murky-satyr1780.56022008/05/12 22:46:230B / 105B / 69B
2sumim4451.85112007/02/10 00:07:20?B / ?B / ?B

Prolog _

RankUserSizeTimeDateStatistics
1mskzzzz2170.37042007/06/12 01:52:300B / 127B / 85B

Forth _

RankUserSizeTimeDateStatistics
151b1360.03862008/05/21 19:56:200B / 92B / 12B

BASIC _

RankUserSizeTimeDateStatistics
1poop2450.04882007/09/15 17:33:330B / 145B / 79B

Perl6 _

RankUserSizeTimeDateStatistics
1Hydrazer3271.22252021/06/16 07:07:260B / 254B / 49B

J _

RankUserSizeTimeDateStatistics
1I., S.1190.15002010/11/11 07:21:370B / 37B / 82B

C _

RankUserSizeTimeDateStatistics
1shinh640.05672009/09/04 06:29:040B / 36B / 27B
251b640.06372009/09/05 12:52:440B / 36B / 27B
3inaniwa640.01012009/12/27 09:47:370B / 36B / 27B
4hallvabo640.00202010/08/14 07:52:010B / 38B / 25B
5Reputeless640.00212011/02/04 09:03:390B / 36B / 27B
6csanders660.00122010/11/17 04:37:000B / 37B / 28B
7kurimura671.12602007/02/13 17:22:47?B / ?B / ?B
8ozy4dm670.99402007/02/13 17:41:08?B / ?B / ?B
9abf770.03192013/05/21 09:13:540B / ?B / ?B
10wiseler1570.05372008/05/10 07:20:533B / ?B / ?B

C++ _

RankUserSizeTimeDateStatistics
1Shax1060.03552008/05/10 13:51:452B / ?B / ?B
2brixp1560.06292010/10/08 13:47:579B / ?B / ?B
3wiseler1660.05112008/05/10 07:22:333B / ?B / ?B

D _

RankUserSizeTimeDateStatistics
151b910.12032009/09/05 12:56:380B / 58B / 29B
2kurimura1100.20212007/02/09 22:01:06?B / ?B / ?B

Go _

RankUserSizeTimeDateStatistics
1emoken3970.00152009/12/22 04:45:000B / 234B / 150B

OCaml _

RankUserSizeTimeDateStatistics
1m.ukai560.26422007/02/15 12:56:200B / 40B / 13B
2jijixi560.29652007/02/17 02:11:590B / 40B / 13B
3ksk560.26092007/02/17 09:19:370B / 40B / 13B

Haskell _

RankUserSizeTimeDateStatistics
1henkma1600.04652012/10/02 18:54:080B / 99B / 54B
2rst761710.00332010/05/06 19:54:180B / 103B / 60B
3aljee2090.14092007/02/12 22:58:04?B / ?B / ?B
4m2220.14442007/02/11 10:05:25?B / ?B / ?B

Java _

RankUserSizeTimeDateStatistics
1rotary-o2140.20262021/05/17 02:45:200B / 133B / 74B
2hakusui2200.30122011/12/24 12:51:390B / 138B / 75B

AWK _

RankUserSizeTimeDateStatistics
1usa250.71772007/02/13 18:10:20?B / ?B / ?B
2eban250.23212007/02/13 18:38:45?B / ?B / ?B
3yamaya250.07042007/02/21 23:56:060B / ?B / ?B
4tabasa250.04732008/02/19 02:11:180B / 14B / 11B

sed _

RankUserSizeTimeDateStatistics
1usa2500.19462007/02/09 23:57:43?B / ?B / ?B
2eban2500.55862007/02/10 00:11:05?B / ?B / ?B

bc _

RankUserSizeTimeDateStatistics
1McBusLuck3360.04332020/04/05 08:49:500B / 262B / 48B

xgawk _

RankUserSizeTimeDateStatistics
1llhuii1210.03292014/03/19 19:30:180B / 56B / 65B

Postscript _

RankUserSizeTimeDateStatistics
1ySas(embed)2480.92372007/05/15 12:44:53142B / 67B / 36B

R _

RankUserSizeTimeDateStatistics
1olf800.33872021/02/10 23:07:160B / 50B / 29B
2NikNakk1220.42142014/07/04 21:26:200B / ?B / ?B

Brainfuck _

RankUserSizeTimeDateStatistics
1mitchs (cheat)2850.11132015/10/04 16:47:1733B / 170B / 80B

Befunge _

RankUserSizeTimeDateStatistics
1AndoDaan6260.01372014/08/04 21:06:070B / 292B / 192B

Vim _

RankUserSizeTimeDateStatistics
1nn480.10952010/10/10 10:55:172B / 30B / 15B

goruby _

RankUserSizeTimeDateStatistics
1murky-satyr780.37562008/08/13 02:09:320B / 34B / 42B
2leonid780.16272012/02/27 01:57:390B / 33B / 43B

Groovy _

RankUserSizeTimeDateStatistics
1murky-satyr1323.52652009/12/31 23:09:490B / 80B / 49B
2nn1323.42772010/01/01 01:10:200B / 80B / 49B

Scala _

RankUserSizeTimeDateStatistics
1rotary-o1366.09142021/05/17 02:16:540B / 96B / 38B
2murky-satyr1789.83962012/06/18 12:56:580B / 124B / 49B
3tarhashi21210.43062012/06/05 12:06:330B / ?B / ?B
4zakki24921.25972011/06/01 00:06:180B / 177B / 67B

Language Ranking_

RankLangUserSizeScore
1AWKusa2510000
2Vimnn485208
3OCamlm.ukai564464
4Luaplanque574385
5Perlteebee594237
6Cshinh643906
7gorubymurky-satyr783205
8Rolf803125
9Rubyleonid842976
10Python3mypetlion892808
11D51b912747
12Pythontwobit942659
13JavaScriptnn1002500
14C++Shax1062358
15JI., S.1192100
16xgawkllhuii1212066
17Groovymurky-satyr1321893
18PHPo-cn1341865
19Forth51b1361838
20Scalarotary-o1361838
21Arcyouz1401785
22Haskellhenkma1601562
23Smalltalkmurky-satyr1781404
24Common LISPkozima2131173
25Javarotary-o2141168
26Prologmskzzzz2171152
27BASICpoop2451020
28PostscriptySas(embed)2481008
29sedusa2501000
30Brainfuckmitchs (cheat)285877
31Perl6Hydrazer327764
32Schemema(this_problem_sucks)332753
33bcMcBusLuck336744
34Goemoken397629
35BefungeAndoDaan626399

Referer

Note that, they may contain spoilers.

return to the top page