(Ben ... yarım benim şimdiki yaşındayken) Lisenin sıkılmış olsa da, bunu buldum f ( x =) x ( x -1 ) kapsamaktadır, örneğin, bazı ilginç özelliklere sahip olduğunu azami f 0 ≤ için x isimli f ( e ) ve bir izotopun nükleonu başına bağlanma enerjisinin 6 x f ( x ÷ 21) ...
Yine de, dilinizin etki alanındaki herhangi bir sayı için x'in x'in kök dizinini hesaplayan en kısa işlevi veya programı yazın.
Örnek vakalar
Tüm diller için
-1 > -1
¯0.2 > -3125
¯0.5 > 4
0.5 > 0.25
1 > 1
2 > 1.414
e > 1.444
3 > 1.442
100 > 1.047
10000 > 1.001
Karmaşık sayıları işleyen diller için
-2 > -0.7071i
i > 4.81
2i > 2.063-0.745i
1+2i > 1.820-0.1834i
2+2i > 1.575-0.1003i
Sonsuzlukla uğraşan diller için
-1/∞ > 0 (or ∞ or ̃∞)
0 > 0 (or 1 or ∞)
1/∞ > 0
∞ > 1
-∞ > 1
Hem sonsuzlukları hem de karmaşık sayıları işleyen diller için
-∞-2i > 1 (or ̃∞)
̃∞
yönlendirilmiş sonsuzluğu gösterir .
x
.x
Sorgudaki sınırları atlarsanız , Wolfram Alphax
, işlev değerinin karmaşık logaritma (veya benzeri bir karmaşık işlev için) "dal" seçimine bağlı olduğu negatif değerleri içerir .