{"id":1849,"date":"2018-04-29T10:26:18","date_gmt":"2018-04-29T01:26:18","guid":{"rendered":"https:\/\/pandanote.info\/?p=1849"},"modified":"2022-08-07T00:19:35","modified_gmt":"2022-08-06T15:19:35","slug":"eclipse%e3%81%a7scala%e3%81%ae%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0%e3%82%92main%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89%e3%81%8b%e3%82%89%e5%8b%95%e3%81%8b%e3%81%97%e3%81%a6%e3%81%bf%e3%81%be","status":"publish","type":"post","link":"https:\/\/pandanote.info\/?p=1849","title":{"rendered":"Eclipse\u3067Scala\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092main\u30e1\u30bd\u30c3\u30c9\u304b\u3089\u52d5\u304b\u3057\u3066\u307f\u307e\u3057\u305f\u3002"},"content":{"rendered":"<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>\u3053\u3053\u306e\u3068\u3053\u308dScala\u306e\u8a18\u4e8b\u304c\u7d9a\u3044\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u8a18\u4e8b\u3082Scala\u95a2\u9023\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/pandanote.info\/?p=1829\">\u524d\u306e\u8a18\u4e8b<\/a>\u3067\u3001Scala\u3067\u8907\u7d20\u6570\u3092\u6271\u3046\u305f\u3081\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u53ca\u3073\u30af\u30e9\u30b9(\u4ee5\u4e0b\u3001\u5358\u306b\u300c\u30af\u30e9\u30b9\u7b49\u300d\u3068\u66f8\u304d\u307e\u3059\u3002)\u3092\u66f8\u304d\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u3060\u3051\u3060\u3068\u305b\u3063\u304b\u304f\u66f8\u3044\u305f\u30af\u30e9\u30b9\u3092\u52d5\u304b\u3059\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u3068\u304b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u5de5\u5b66\u7684\u306b\u306f\u3001\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3068\u3057\u3066<del datetime=\"2018-04-28T04:07:31+00:00\">\u30ca\u30a6\u306a\u30e4\u30f3\u30b0\u306b\u30d0\u30ab\u3046\u3051\u306a<\/del>\u4e00\u822c\u7684\u306a\u306e\u306f\u300c\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u300d\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308b\u3093\u3067\u3059\u3051\u3069\u3001\u672c\u30b5\u30a4\u30c8\u306e\u7ba1\u7406\u4eba\u306f\u3069\u3061\u3089\u304b\u3068\u3044\u3046\u3068\u65e9\u304f\u8a08\u7b97\u7d50\u679c\u3060\u3051\u304c\u77e5\u308a\u305f\u3044\u6d3e\u306a\u306e\u3067\u3001\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306e\u4ef6\u306f\u3044\u3063\u305f\u3093\u8107\u306b\u7f6e\u3044\u3066\u304a\u304f\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u3053\u306e\u8a18\u4e8b\u3067\u306fEclipse\u306eScala\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067main\u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3063\u305f\u30af\u30e9\u30b9\u3092\u5b9a\u7fa9\u3057\u3066\u8a08\u7b97\u7d50\u679c\u3092\u78ba\u8a8d\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2>Eclipse\u306eScala\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3078\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u8ffd\u52a0<\/h2>\n<p><a href=\"https:\/\/pandanote.info\/?p=1829\">\u524d\u306e\u8a18\u4e8b<\/a>\u306e\u300c\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u305f\u3081\u306e\u6e96\u5099\u300d\u306e\u624b\u98064\u3042\u305f\u308a\u4ee5\u964d\u306e\u624b\u9806\u3092\u7528\u3044\u308b\u3068\u3001main\u95a2\u6570\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u4e0b\u56f3\u306e\u3088\u3046\u306b&#8221;ComplexNumberMain&#8221;\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u305f\u3082\u306e\u3068\u4eee\u5b9a\u3057\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/pandanote.info\/?attachment_id=1851\" rel=\"attachment wp-att-1851\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pandanote.info\/wordpress\/wp-content\/uploads\/2018\/04\/my_first_scala_take24.png\" alt=\"\" width=\"773\" height=\"345\" class=\"alignnone size-full wp-image-1851\" srcset=\"https:\/\/pandanote.info\/wordpress\/wp-content\/uploads\/2018\/04\/my_first_scala_take24.png 773w, https:\/\/pandanote.info\/wordpress\/wp-content\/uploads\/2018\/04\/my_first_scala_take24-300x134.png 300w, https:\/\/pandanote.info\/wordpress\/wp-content\/uploads\/2018\/04\/my_first_scala_take24-768x343.png 768w, https:\/\/pandanote.info\/wordpress\/wp-content\/uploads\/2018\/04\/my_first_scala_take24-660x295.png 660w\" sizes=\"auto, (max-width: 773px) 100vw, 773px\" \/><\/a><\/p>\n<h2>main\u95a2\u6570\u3092\u30b5\u30af\u30b5\u30af\u3068(?)\u66f8\u304d\u307e\u3059\u3002<\/h2>\n<p>\u524d\u9805\u3067\u4f5c\u3063\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306bmain\u95a2\u6570\u3092\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306amain\u95a2\u6570\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002\u304b\u306a\u308a\u9577\u3044\u3067\u3059\u3002<br \/>\n<script src=\"https:\/\/gist.github.com\/pandanote-info\/3f1dbbb3b98c4bec755dc3b3cd19cec4.js\"><\/script><\/p>\n<p>\u6f14\u7b97\u5b50\u95a2\u9023\u306e\u52d5\u4f5c\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306e\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306e\u91cf\u304c\u591a\u3059\u304e\u3066\u6700\u521d\u304b\u3089\u624b\u3067\u66f8\u304f\u30ec\u30d9\u30eb\u3067\u306f\u306a\u3055\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u4f5c\u308a\u307e\u3057\u305f\u3002<\/p>\n<ol>\n<li>Python3\u3067\u5143\u306e\u30b3\u30fc\u30c9(ComplexNumber\u30af\u30e9\u30b9\u7b49)\u306e&#8221;def&#8221;\u306e\u884c\u3092\u53d6\u308a\u51fa\u3057\u3066\u3001\u305d\u308c\u3092\u5143\u306b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u7684\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u51fa\u3059\u305f\u3081\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/li>\n<li>\u624b\u98061\u3067\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u3001Scala\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u7684\u306a\u3082\u306e\u3092\u4f5c\u308a\u307e\u3059\u3002<\/li>\n<li>\u624b\u98062\u3067\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002\u3059\u308b\u3068\u4e0a\u8a18\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u51fa\u6765\u4e0a\u304c\u308a\u307e\u3059\u3002<\/li>\n<\/ol>\n<h2>\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3002<\/h2>\n<p>\u524d\u7bc0\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092Eclipse\u4e0a\u3067\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002Eclipse\u3092\u8d77\u52d5\u3057\u3066\u3001\u524d\u7bc0\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092Project Explorer\u4e0a\u3067\u53f3\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u30e1\u30cb\u30e5\u30fc\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u300cRun As\u300d\u2192\u300cScala Application\u300d\u3068\u9078\u629e\u3057\u3066\u3044\u304d\u307e\u3059(\u4e0b\u56f3)\u3002<br \/>\n<a href=\"https:\/\/pandanote.info\/?attachment_id=1854\" rel=\"attachment wp-att-1854\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/pandanote.info\/wordpress\/wp-content\/uploads\/2018\/04\/my_first_scala_take25.png\" alt=\"\" width=\"912\" height=\"731\" class=\"alignnone size-full wp-image-1854\" srcset=\"https:\/\/pandanote.info\/wordpress\/wp-content\/uploads\/2018\/04\/my_first_scala_take25.png 912w, https:\/\/pandanote.info\/wordpress\/wp-content\/uploads\/2018\/04\/my_first_scala_take25-300x240.png 300w, https:\/\/pandanote.info\/wordpress\/wp-content\/uploads\/2018\/04\/my_first_scala_take25-768x616.png 768w, https:\/\/pandanote.info\/wordpress\/wp-content\/uploads\/2018\/04\/my_first_scala_take25-660x529.png 660w\" sizes=\"auto, (max-width: 912px) 100vw, 912px\" \/><\/a><br \/>\n\u3059\u308b\u3068\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u5b9f\u884c\u3055\u308c\u3066Eclipse\u306eConsole\u30d3\u30e5\u30fc\u306b\u5b9f\u884c\u7d50\u679c\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"code\">&#8212; toString() &#8212;<br \/>\na=-2.0+4.0i<br \/>\nb=-3.0+3.0i<br \/>\nc=5.0<br \/>\nd=9.0-4.0i<br \/>\ne=4.0-1.0i<br \/>\naa=2.0+1.0i<br \/>\nab=3.0-3.0i<br \/>\nac=4.0+5.0i<br \/>\nad=1.0<br \/>\n1.0<br \/>\n0.0<br \/>\n&#8212; re() &#8212;<br \/>\nRe(a) = -2.0<br \/>\nRe(b) = -3.0<br \/>\nRe(c) = 5.0<br \/>\nRe(d) = 9.0<br \/>\nRe(e) = 4.0<br \/>\nRe(aa) = 2.0<br \/>\nRe(ab) = 3.0<br \/>\nRe(ac) = 4.0<br \/>\nRe(ad) = 1.0<br \/>\nRe(ComplexNumber.one) = 1.0<br \/>\n&#8212; im() &#8212;<br \/>\nIm(a) = 4.0<br \/>\nIm(b) = 3.0<br \/>\nIm(c) = 0.0<br \/>\nIm(d) = -4.0<br \/>\nIm(e) = -1.0<br \/>\nIm(aa) = 1.0<br \/>\nIm(ab) = -3.0<br \/>\nIm(ac) = 5.0<br \/>\nIm(ad) = 0.0<br \/>\nIm(ComplexNumber.imaginaryUnit) = 1.0<br \/>\n&#8212; +(that: ComplexNumber) &#8212;<br \/>\na + b = -5.0+7.0i<br \/>\nb + c = 2.0+3.0i<br \/>\nc + d = 14.0-4.0i<br \/>\nd + e = 13.0-5.0i<br \/>\naa + 1 = 3.0+1.0i<br \/>\n&#8212; +(that: Int) &#8212;<br \/>\na + 2 = 0.0+4.0i<br \/>\nb + 3 = 0.0+3.0i<br \/>\nc + 4 = 9.0<br \/>\nd + 5 = 14.0-4.0i<br \/>\ne + 6 = 15.0-4.0i<br \/>\n&#8212; +(that: Long) &#8212;<br \/>\na + 2L = 0.0+4.0i<br \/>\nb + 4L = 1.0+3.0i<br \/>\nc + 8L = 13.0<br \/>\nd + 16L = 25.0-4.0i<br \/>\ne + 32L = 36.0-1.0i<br \/>\n&#8212; +(that: Float) &#8212;<br \/>\na + 0.1f = -1.8999999985098839+4.0i<br \/>\nb + 0.2f = -2.7999999970197678+3.0i<br \/>\nc + 0.3f = 5.300000011920929<br \/>\nd + 0.4f = 9.400000005960464-4.0i<br \/>\ne + 0.5f = 4.5-1.0i<br \/>\n&#8212; +(that: Double) &#8212;<br \/>\na + 0.3 = -1.7+4.0i<br \/>\nb + 0.6 = -2.4+3.0i<br \/>\nc + 0.9 = 5.9<br \/>\nd + 1.2 = 10.2-4.0i<br \/>\ne + 1.5 = 5.5-1.0i<br \/>\n&#8212; -(that: ComplexNumber) &#8212;<br \/>\na &#8211; b = 1.0+1.0i<br \/>\nb &#8211; c = -8.0+3.0i<br \/>\nc &#8211; d = -4.0+4.0i<br \/>\nd &#8211; e = 5.0-3.0i<br \/>\naa &#8211; ab = -1.0+4.0i<br \/>\n&#8212; -(that: Int) &#8212;<br \/>\na &#8211; 2 = -4.0+4.0i<br \/>\nb &#8211; 3 = -6.0+3.0i<br \/>\nc &#8211; 4 = 1.0<br \/>\nd &#8211; 5 = 4.0-4.0i<br \/>\ne &#8211; 6 = -2.0-1.0i<br \/>\n&#8212; -(that: Long) &#8212;<br \/>\na &#8211; 1L = -3.0+4.0i<br \/>\nb &#8211; 2L = -5.0+3.0i<br \/>\nc &#8211; 4L = 1.0<br \/>\nd &#8211; 8L = 1.0-4.0i<br \/>\ne &#8211; 16L = -12.0-1.0i<br \/>\n&#8212; -(that: Float) &#8212;<br \/>\na &#8211; 0.1f = -2.100000001490116+4.0i<br \/>\nb &#8211; 0.2f = -3.2000000029802322+3.0i<br \/>\nc &#8211; 0.3f = 4.699999988079071<br \/>\nd &#8211; 0.4f = 8.599999994039536-4.0i<br \/>\ne &#8211; 0.5f = 3.5-1.0i<br \/>\n&#8212; -(that: Double) &#8212;<br \/>\na &#8211; 0.3 = -2.3+4.0i<br \/>\nb &#8211; 0.6 = -3.6+3.0i<br \/>\nc &#8211; 0.9 = 4.1<br \/>\nd &#8211; 1.2 = 7.8-4.0i<br \/>\ne &#8211; 1.5 = 2.5-1.0i<br \/>\n&#8212; *(that: ComplexNumber) &#8212;<br \/>\na * b = -6.0-18.0i<br \/>\nb * c = -15.0+15.0i<br \/>\nc * d = 45.0-20.0i<br \/>\nd * e = 32.0-25.0i<br \/>\naa * ac = 3.0+14.0i<br \/>\n&#8212; *(that: Int) &#8212;<br \/>\na * 2 = -4.0+8.0i<br \/>\nb * 3 = -9.0+9.0i<br \/>\nc * 4 = 20.0<br \/>\nd * 5 = 45.0-20.0i<br \/>\ne * 6 = 24.0-6.0i<br \/>\n&#8212; *(that: Long) &#8212;<br \/>\na * 7L = -14.0+28.0i<br \/>\nb * 8L = -24.0+24.0i<br \/>\nc * 9L = 45.0<br \/>\nd * 10L = 90.0-40.0i<br \/>\ne * 11L = 44.0-11.0i<br \/>\n&#8212; *(that: Float) &#8212;<br \/>\na * 0.2f = -0.4000000059604645+0.800000011920929i<br \/>\nb * 0.3f = -0.9000000357627869+0.9000000357627869i<br \/>\nc * 0.4f = 2.0000000298023224<br \/>\nd * 0.5f = 4.5-2.0i<br \/>\ne * 0.6f = 2.4000000953674316-0.6000000238418579i<br \/>\n&#8212; *(that: Double) &#8212;<br \/>\na * 0.2 = -0.4+0.8i<br \/>\nb * 0.3 = -0.8999999999999999+0.8999999999999999i<br \/>\nc * 0.4 = 2.0<br \/>\nd * 0.5 = 4.5-2.0i<br \/>\ne * 0.6 = 2.4-0.6i<br \/>\n&#8212; \/(that: ComplexNumber) &#8212;<br \/>\na \/ b = 1.0-0.3333333333333333i<br \/>\nb \/ c = -0.6+0.6i<br \/>\nc \/ d = 0.4639175257731959+0.20618556701030927i<br \/>\nd \/ e = 2.3529411764705883-0.4117647058823529i<br \/>\naa \/ ab = 0.16666666666666666+0.5i<br \/>\n&#8212; \/(that: Int) &#8212;<br \/>\na \/ 2 = -1.0+2.0i<br \/>\nb \/ 3 = -1.0+1.0i<br \/>\nc \/ 4 = 1.25<br \/>\nd \/ 5 = 1.8-0.8i<br \/>\ne \/ 6 = 0.6666666666666666-0.16666666666666666i<br \/>\nab \/ 4 = 0.75-0.75i<br \/>\n&#8212; \/(that: Long) &#8212;<br \/>\na \/ 6L = -0.3333333333333333+0.6666666666666666i<br \/>\nb \/ 5L = -0.6+0.6i<br \/>\nc \/ 4L = 1.25<br \/>\nd \/ 3L = 3.0-1.3333333333333333i<br \/>\ne \/ 2L = 2.0-0.5i<br \/>\n&#8212; \/(that: Float) &#8212;<br \/>\na \/ 0.5f = -4.0+8.0i<br \/>\nb \/ 0.6f = -4.999999801317859+4.999999801317859i<br \/>\nc \/ 0.7f = 7.142857264499277<br \/>\nd \/ 0.8f = 11.249999832361938-4.999999925494195i<br \/>\ne \/ 0.9f = 4.444444562182017-1.1111111405455043i<br \/>\n&#8212; \/(that: Double) &#8212;<br \/>\na \/ 1.1 = -1.8181818181818181+3.6363636363636362i<br \/>\nb \/ 1.2 = -2.5+2.5i<br \/>\nc \/ 1.3 = 3.846153846153846<br \/>\nd \/ 1.4 = 6.428571428571429-2.857142857142857i<br \/>\ne \/ 1.5 = 2.6666666666666665-0.6666666666666666i<br \/>\n&#8212; %(that: ComplexNumber) &#8212;<br \/>\na % b = 1.0+1.0i<br \/>\nb % c = 2.0-2.0i<br \/>\nc % d = 5.0<br \/>\nd % e = 1.0-2.0i<br \/>\n&#8212; %(that: Int) &#8212;<br \/>\na % 5 = -2.0-1.0i<br \/>\nb % 6 = -3.0-3.0i<br \/>\nc % 7 = -2.0<br \/>\nd % 8 = 1.0-4.0i<br \/>\nab % 4 = -1.0+1.0i<br \/>\n&#8212; %(that: Long) &#8212;<br \/>\na % 5L = -2.0-1.0i<br \/>\nb % 6L = -3.0-3.0i<br \/>\nc % 7L = -2.0<br \/>\nd % 8L = 1.0-4.0i<br \/>\ne % 4L = 4.0-1.0i<br \/>\n&#8212; %(that: Float) &#8212;<br \/>\na % 1.5f = -0.5-0.5i<br \/>\nb % 2.0f = -1.0-1.0i<br \/>\nc % 2.5f = 0.0<br \/>\nd % 3.0f = 0.0-1.0i<br \/>\ne % 4.0f = 0.0-1.0i<br \/>\n&#8212; %(that: Double) &#8212;<br \/>\na % 1.5 = -0.5-0.5i<br \/>\nb % 2.0 = -1.0-1.0i<br \/>\nc % 2.5 = 0.0<br \/>\nd % 3.0 = 0.0-1.0i<br \/>\ne % 4.0 = 1.0<br \/>\n&#8212; unary_- &#8212;<br \/>\n-a = 2.0-4.0i<br \/>\n-b = 3.0-3.0i<br \/>\n-c = -5.0<br \/>\n-d = -9.0+4.0i<br \/>\n-e = -4.0+1.0i<br \/>\n&#8212; abs &#8212;<br \/>\na.abs = 4.47213595499958<br \/>\nb.abs = 4.242640687119285<br \/>\nc.abs = 5.0<br \/>\nd.abs = 9.848857801796104<br \/>\ne.abs = 4.123105625617661<br \/>\n&#8212; conjugate &#8212;<br \/>\na.conjugate = -2.0-4.0i<br \/>\nb.conjugate = -3.0-3.0i<br \/>\nc.conjugate = 5.0<br \/>\nd.conjugate = 9.0+4.0i<br \/>\ne.conjugate = 4.0+1.0i<br \/>\naa.conjugate*(ac-ComplexNumber.one*7) = -1.0+13.0i<br \/>\n&#8212; log &#8212;<br \/>\na.log = 1.4978661367769956+2.0344439357957027i<br \/>\nb.log = 1.4451858789480823+2.356194490192345i<br \/>\nc.log = 1.6094379124341003<br \/>\nd.log = 2.2873554892516914-0.41822432957922906i<br \/>\ne.log = 1.416606672028108-0.24497866312686414i<br \/>\n&#8212; exp &#8212;<br \/>\na.exp = -0.08846104456538201-0.10242208005667372i<br \/>\nb.exp = -0.04928882411191869+0.00702595148935012i<br \/>\nc.exp = 148.4131591025766<br \/>\nd.exp = -5296.529118582112+6132.434136078618i<br \/>\ne.exp = 29.49950635904248-45.94275907707917i<br \/>\naa.exp = 3.992324048441272+6.217676312367968i<br \/>\naa.exp.log = 2.0+1.0i<br \/>\naa.exp.log != aa: true<br \/>\n&#8212; pow(that: Double) &#8212;<br \/>\na pow 0.2 = 1.2391227282494208+0.533984145234475i<br \/>\nb pow 0.4 = 1.0477874354927301+1.4421556827090496i<br \/>\nc pow 0.6 = 2.626527804403767<br \/>\nd pow 0.8 = 5.887527513943062-2.0467970763670778i<br \/>\ne pow 1.1 = 4.579136276791019-1.264732948760852i<br \/>\na.pow(0.2) = 1.2391227282494208+0.533984145234475i<br \/>\nb.pow(0.4) = 1.0477874354927301+1.4421556827090496i<br \/>\nc.pow(0.6) = 2.626527804403767<br \/>\nd.pow(0.8) = 5.887527513943062-2.0467970763670778i<br \/>\ne.pow(1.1) = 4.579136276791019-1.264732948760852i<br \/>\n&#8212; pow(that: Int) &#8212;<br \/>\naa.pow(3) = 2.0000000000000018+11.000000000000002i<br \/>\n&#8212; pow(that: ComplexNumber) &#8212;<br \/>\na pow b = -9.728932897152134E-7-2.4973670775173493E-5i<br \/>\nb pow c = 971.9999999999986-972.0000000000013i<br \/>\nc pow d = 1929840.5975569494-300686.7699883458i<br \/>\nd pow e = -4231.1551049887785+4522.423994559331i<br \/>\ne pow a = 0.15546111986274969-0.019819005421442715i<br \/>\na.pow(b) = -9.728932897152134E-7-2.4973670775173493E-5i<br \/>\nb.pow(c) = 971.9999999999986-972.0000000000013i<br \/>\nc.pow(d) = 1929840.5975569494-300686.7699883458i<br \/>\nd.pow(e) = -4231.1551049887785+4522.423994559331i<br \/>\ne.pow(a) = 0.15546111986274969-0.019819005421442715i<br \/>\naa.pow(aa) = -0.5048246889783188+3.104144076995529i<br \/>\n&#8212; **(that: ComplexNumber) &#8212;<br \/>\na ** b = -9.728932897152134E-7-2.4973670775173493E-5i<br \/>\nb ** c = 971.9999999999986-972.0000000000013i<br \/>\nc ** d = 1929840.5975569494-300686.7699883458i<br \/>\nd ** e = -4231.1551049887785+4522.423994559331i<br \/>\ne ** a = -4231.1551049887785+4522.423994559331i<br \/>\naa ** ab = 23.39151968521679-38.36036198687259i<br \/>\n&#8212; **(that: Double) &#8212;<br \/>\na ** 0.2 = 1.2391227282494208+0.533984145234475i<br \/>\nb ** 0.4 = 1.0477874354927301+1.4421556827090496i<br \/>\nc ** 0.6 = 2.626527804403767<br \/>\nd ** 0.8 = 5.887527513943062-2.0467970763670778i<br \/>\ne ** 1.1 = 4.579136276791019-1.264732948760852i<br \/>\n&#8212; **(that: Int) &#8212;<br \/>\naa ** 2 = 3.000000000000001+4.0i<br \/>\n&#8212; equals(that: Any) &#8212;<br \/>\na equals b: false<br \/>\nb equals c: false<br \/>\nc equals d: false<br \/>\nd equals e: false<br \/>\ne equals a: false<br \/>\na equals a: true<br \/>\nb equals b: true<br \/>\nc equals c: true<br \/>\nd equals d: true<br \/>\ne equals e: true<br \/>\nad == 1: true<br \/>\nad.equals(1): true<br \/>\naa != aa: false<br \/>\n&#8212; >(that: ComplexNumber) &#8212;<br \/>\na > b: true<br \/>\nb > c: false<br \/>\nc > d: false<br \/>\nd > e: true<br \/>\naa > ab: false<br \/>\n&#8212; >=(that: ComplexNumber) &#8212;<br \/>\na >= b: true<br \/>\nb >= c: false<br \/>\nc >= d: false<br \/>\nd >= e: true<br \/>\n&#8212; <(that: ComplexNumber) ---\na < b: false\nb < c: true\nc < d: true\nd < e: false\naa < ab: true\n--- <=(that: ComplexNumber) ---\na <= b: false\nb <= c: true\nc <= d: true\nd <= e: false\n--- <>(that: ComplexNumber) &#8212;<br \/>\na <> b: true<br \/>\nb <> c: true<br \/>\nc <> d: true<br \/>\nd <> e: true<br \/>\naa <> aa: false<br \/>\n&#8212; ComplexNumber.exp(that: ComplexNumber)&#8212;<br \/>\nComplexNumber.exp(a) = -0.08846104456538201-0.10242208005667372i<br \/>\nComplexNumber.exp(b) = -0.04928882411191869+0.00702595148935012i<br \/>\nComplexNumber.exp(c) = 148.4131591025766<br \/>\nComplexNumber.exp(d) = -5296.529118582112+6132.434136078618i<br \/>\nComplexNumber.exp(e) = 29.49950635904248-45.94275907707917i<br \/>\nComplexNumber.exp(aa) = 3.992324048441272+6.217676312367968i<br \/>\n&#8212; ComplexNumber.log(that: ComplexNumber)&#8212;<br \/>\nComplexNumber.log(a) = 1.4978661367769956+2.0344439357957027i<br \/>\nComplexNumber.log(b) = 1.4451858789480823+2.356194490192345i<br \/>\nComplexNumber.log(c) = 1.6094379124341003<br \/>\nComplexNumber.log(d) = 2.2873554892516914-0.41822432957922906i<br \/>\nComplexNumber.log(e) = 1.416606672028108-0.24497866312686414i<br \/>\n&#8212; Imaginary Unit and others. &#8212;<br \/>\naj = 2.0-5.0j<br \/>\naj * aa = 9.0-8.0j<br \/>\naa * aj = 9.0-8.0i<br \/>\naj.pow(0) = 1.0<br \/>\naj.pow(2) = -20.99999999999999-19.999999999999993j<br \/>\naj * aj = -21.0-20.0j<br \/>\naj.pow(2).log = 3.3672958299864737-2.3805798993650633j<br \/>\naj.pow(2).pow(0.5) = 1.9999999999999998-4.999999999999999j\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u7d50\u679c\u306b\u3064\u3044\u3066\u306f\u3059\u3079\u3066\u691c\u8a3c\u3057\u305f\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u304a\u305d\u3089\u304f\u6b63\u3057\u3044\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>$e^x$\u3092\u624b\u8a08\u7b97\u3068\u304b\u7121\u7406\u30b2\u30fc\u904e\u304e\u307e\u3059\u3057\u306d\u2026 (\u00b4\u30fb\u03c9\u30fb`)<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>C++\u3067\u6f14\u7b97\u5b50\u3092\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u3057\u305f\u5834\u5408\u3068\u540c\u69d8\u306b\u3001Scala\u3067\u3082\u6f14\u7b97\u5b50\u3092\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u3059\u308b\u3068\u3001\u52d5\u4f5c\u78ba\u8a8d\u306e\u30d1\u30bf\u30fc\u30f3\u304c\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u898b\u304b\u3051\u306b\u53cd\u3057\u3066(\u203b\u500b\u4eba\u306e\u611f\u60f3\u3067\u3059\u3002)\u5897\u5927\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u305d\u3093\u306a\u3068\u304d\u306b\u3044\u304d\u306a\u308a\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3057\u307e\u3063\u3066\u3001\u305d\u3053\u3067\u4f55\u304b\u554f\u984c\u304c\u767a\u899a\u3059\u308b\u3068\u539f\u56e0\u306e\u5207\u308a\u5206\u3051\u304c\u96e3\u3057\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u3001\u6c17\u529b\u3092\u596a\u308f\u308c\u3066\u3057\u307e\u3044\u304c\u3061\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u521d\u3081\u3066Scala\u3067\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u305f\u305f\u3081\u306bmain\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u884c\u65b9\u6cd5\u3082\u78ba\u8a8d\u3059\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u300c\u3044\u304d\u306a\u308a\u30c6\u30b9\u30c8\u30fc\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u300d\u3068\u3044\u3046\u306e\u306f\u4f5c\u696d\u306e\u5358\u4f4d\u3068\u3057\u3066\u5927\u304d\u3059\u304e\u308b\u3088\u3046\u306b\u611f\u3058\u305f\u306e\u3067\u3001\u3044\u3063\u305f\u3093main\u30e1\u30bd\u30c3\u30c9\u306b\u30c6\u30b9\u30c8\u7528\u306b\u3082\u4f7f\u3048\u308b\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u3066\u52d5\u4f5c\u78ba\u8a8d\u3092\u884c\u3046\u3053\u3068\u3067\u3001\u30a2\u30d7\u30ed\u30fc\u30c1\u3068\u3057\u3066\u306f\u30c0\u30b5\u304f\u3066\u3082\u3044\u3044\u304b\u3089\u4f5c\u696d\u5358\u4f4d\u3092\u5206\u5272\u3057\u3066\u5c0f\u3055\u304f\u3057\u305f\u3068\u3044\u3046\u306e\u304c\u3044\u3063\u305f\u3093main\u30e1\u30bd\u30c3\u30c9\u3092\u66f8\u3044\u305f\u7406\u7531\u3067\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u5225\u306e\u8a18\u4e8b\u3067Eclipse\u3092\u4f7f\u3063\u3066\u30c6\u30b9\u30c8\u3092\u884c\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u304c\u3001\u3044\u308d\u3044\u308d\u3068\u30cf\u30de\u308a\u307e\u3057\u305f\u3068\u3044\u3046\u3053\u3068\u3060\u3051\u3001\u5148\u306b\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u306f\u4ee5\u4e0a\u3067\u3059\u304c\u3001\u6b21\u306e\u8a18\u4e8b\u306b\u7d9a\u3044\u3066\u3044\u304f\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u3053\u3053\u306e\u3068\u3053\u308dScala\u306e\u8a18\u4e8b\u304c\u7d9a\u3044\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u8a18\u4e8b\u3082Scala\u95a2\u9023\u306b\u306a\u308a\u307e\u3059\u3002 \u524d\u306e\u8a18\u4e8b\u3067\u3001Scala\u3067\u8907\u7d20\u6570\u3092\u6271\u3046\u305f\u3081\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u53ca\u3073\u30af\u30e9\u30b9(\u4ee5\u4e0b\u3001\u5358\u306b\u300c\u30af\u30e9\u30b9\u7b49\u300d\u3068\u66f8\u304d\u307e\u3059\u3002)\u3092\u66f8\u304d\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u3060\u3051\u3060\u3068\u305b\u3063\u304b\u304f\u66f8\u3044\u305f\u30af\u30e9\u30b9\u3092\u52d5\u304b\u3059\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002 \u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u958b\u767a\u3068\u304b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u5de5\u5b66\u7684\u306b\u306f\u3001\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3068\u3057\u3066\u30ca\u30a6\u306a\u30e4\u30f3\u30b0\u306b\u30d0\u30ab\u3046\u3051\u306a\u4e00\u822c\u7684\u306a\u306e\u306f\u300c\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u300d\u3068\u3044\u3046\u3053\u2026 <span class=\"read-more\"><a href=\"https:\/\/pandanote.info\/?p=1849\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":1851,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,17],"tags":[],"class_list":["post-1849","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pc","category-scala"],"_links":{"self":[{"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/posts\/1849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pandanote.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1849"}],"version-history":[{"count":9,"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/posts\/1849\/revisions"}],"predecessor-version":[{"id":9333,"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/posts\/1849\/revisions\/9333"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pandanote.info\/index.php?rest_route=\/wp\/v2\/media\/1851"}],"wp:attachment":[{"href":"https:\/\/pandanote.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pandanote.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pandanote.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}