{"id":2941,"date":"2017-03-02T00:00:41","date_gmt":"2017-03-01T15:00:41","guid":{"rendered":"http:\/\/stuffy.dip.jp\/wordpress\/?p=2941"},"modified":"2017-05-29T16:15:21","modified_gmt":"2017-05-29T07:15:21","slug":"resolution-of-decimal-coefficient","status":"publish","type":"post","link":"https:\/\/www.stuffy.site\/wordpress\/?p=2941","title":{"rendered":"\u5c0f\u6570\u4fc2\u6570\u306e\u51e6\u7406"},"content":{"rendered":"<p>\u524d\u56de\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3067\u306f\u9023\u7acb1\u6b21\u65b9\u7a0b\u5f0f\u306e\u89e3\u306e\u5206\u6570\u8868\u793a\u3001\u5206\u6bcd\u306e\u7b26\u53f7\u51e6\u7406\u306b\u3064\u3044\u3066\u5197\u9577\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002\uff08\u30a8\u30ec\u30ac\u30f3\u30c8\u306a\u65b9\u6cd5\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u30fb\u30fb\u30fb\u3002\uff09<\/p>\n<p><a href=\"https:\/\/stuffy.mydns.jp\/~gusachan\/javascript\/SimultaneousEquations.html\">https:\/\/stuffy.mydns.jp\/~gusachan\/javascript\/SimultaneousEquations.html<\/a><\/p>\n<p>\u4eca\u56de\u306f\u3001\u5c0f\u6570\u4fc2\u6570\u306e\u53d6\u308a\u6271\u3044\u306b\u3064\u3044\u3066\u8003\u3048\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: actionscript3; gutter: false; first-line: 1\"><span style=\"font-size: 10pt;\">  function isInteger(w) {\r\n    w = parseFloat(w);\r\n    return Math.round(w) === w;\r\n  }\r\n  var getDecimalPointLength = function(number) {\r\n    var numbers = String(number).split('.'),\r\n        result  = 0;\r\n    if (numbers[1]) {\r\n        result = numbers[1].length;\r\n    }\r\n    return result;\r\n  };\r\n  if(!(isInteger(a1) &amp;&amp; isInteger(b1) &amp;&amp; isInteger(p1))) {\r\n    var s1 = getDecimalPointLength(a1);\r\n    var t1 = getDecimalPointLength(b1);\r\n    var u1 = getDecimalPointLength(p1);\r\n    var v1 = Math.max(s1, t1, u1);\r\n    var a1 = a1*Math.pow(10, v1);\r\n    var b1 = b1*Math.pow(10, v1);\r\n    var p1 = p1*Math.pow(10, v1);\r\n  }\r\n  if(!(isInteger(c1) &amp;&amp; isInteger(d1) &amp;&amp; isInteger(q1))) {\r\n    var s2 = getDecimalPointLength(c1);\r\n    var t2 = getDecimalPointLength(d1);\r\n    var u2 = getDecimalPointLength(q1);\r\n    var v2 = Math.max(s2, t2, u2);\r\n    var c1 = c1*Math.pow(10, v2);\r\n    var d1 = d1*Math.pow(10, v2);\r\n    var q1 = q1*Math.pow(10, v2);\r\n  }\r\n  var x1= d1*p1-b1*q1, y1 = a1*q1-c1*p1;\r\n  var z = a1*d1-b1*c1, z1 = Math.abs(z);<\/span><\/pre>\n<p>\u9023\u7acb\u65b9\u7a0b\u5f0f\u306e\u7247\u65b9\u3001\u307e\u305f\u306f\u4e21\u65b9\u306b\u5c0f\u6570\u4fc2\u6570\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u5c0f\u6570\u70b9\u4ee5\u4e0b\u306e\u6841\u6570\u3092\u53d6\u5f97\u3057\u3001\u65b9\u7a0b\u5f0f\u309210\u306e\u6700\u5927\u6841\u6570\u306e\u3079\u304d\u4e57\u500d\u3057\u3066\u4fc2\u6570\u3092\u5ba3\u8a00\u3057\u76f4\u3059\u65b9\u6cd5\u3092\u63a1\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u5272\u308a\u5207\u308c\u306a\u3044\u5206\u6570\u306e\u5b9a\u91cf\u5316\u3068\u3057\u3066\u5c0f\u6570\u8868\u793a\u4f75\u8a18\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u53c2\u8003URL: http:\/\/shanabrian.com\/web\/javascript\/get-decimal-point-length.php<\/p>\n<p>http:\/\/blog.at-human.com\/2016\/02\/10\/js%E6%95%B4%E6%95%B0%E3%81%8B%E3%81%A9%E3%81%86%E3%81%8B%E3%82%92%E5%88%A4%E5%88%A5%E3%81%99%E3%82%8B%E9%96%A2%E6%95%B0%EF%BC%88isinteger%EF%BC%89\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3067\u306f\u9023\u7acb1\u6b21\u65b9\u7a0b\u5f0f\u306e\u89e3\u306e\u5206\u6570\u8868\u793a\u3001\u5206\u6bcd\u306e\u7b26\u53f7\u51e6\u7406\u306b\u3064\u3044\u3066\u5197\u9577\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002\uff08\u30a8\u30ec\u30ac\u30f3\u30c8\u306a\u65b9\u6cd5\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u30fb\u30fb\u30fb\u3002\uff09 https:\/\/stuffy.mydns.jp\/~gusachan\/ja &hellip; <a href=\"https:\/\/www.stuffy.site\/wordpress\/?p=2941\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">\u5c0f\u6570\u4fc2\u6570\u306e\u51e6\u7406<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[87,5],"tags":[],"class_list":["post-2941","post","type-post","status-publish","format-standard","hentry","category-javascript","category-software"],"_links":{"self":[{"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2941"}],"version-history":[{"count":8,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2941\/revisions"}],"predecessor-version":[{"id":2953,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2941\/revisions\/2953"}],"wp:attachment":[{"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}