{"provider_name":"Hatena Blog","description":"python\u3067\u5c0f\u6570\u90e8\u306e\u6841\u6570\u3092\u5236\u9650\u3059\u308b\u5834\u5408\u3001decimal\u3092\u4f7f\u3046\u306e\u304c\u4e00\u822c\u7684\u3060\u305d\u3046\u3060\u3002 decimal\u306f\u6709\u52b9\u6841\u6570\u3092\u5236\u5fa1\u3067\u304d\u308b\u3051\u3069\u3001Java\u306eBigDecimal#setScale\u306e\u3088\u3046\u306b\u5c0f\u6570\u70b9\u4ee5\u4e0b\u306e\u6841\u6570\u3092\u5236\u9650\u3059\u308b\u6a5f\u80fd\u304c\u306a\u304b\u3063\u305f\u3002\u305d\u3093\u306a\u308f\u3051\u3067\u3044\u3044\u611f\u3058\u306b \u5c0f\u6570\u90e8\u3092\u6210\u578b\u3057\u3066\u304f\u308c\u308b\u95a2\u6570\u3092\u4f5c\u3063\u305f\u3002 from decimal import Decimal,getcontext,ROUND_HALF_UP def floatScale(v:float,n:int,rounding=ROUND_HALF_UP,max_decimal:int=None)->float or int: \"\"\" \u3044\u3044\u611f\u3058\u306b\u5c0f\u6570\u70b9\u6841\u6570\u3092\u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnyatla.hatenadiary.jp%2Fentry%2F20200509%2F1589025933\" title=\"Python\u3067\u3044\u3044\u304b\u3093\u3058\u306b \u5c0f\u6570\u90e8\u306e\u6841\u6570\u3092\u5236\u9650\u3059\u308b - nyatla@hatena blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://nyatla.hatenadiary.jp/","blog_title":"nyatla@hatena blog","author_url":"https://blog.hatena.ne.jp/nyatla/","image_url":null,"version":"1.0","title":"Python\u3067\u3044\u3044\u304b\u3093\u3058\u306b \u5c0f\u6570\u90e8\u306e\u6841\u6570\u3092\u5236\u9650\u3059\u308b","author_name":"nyatla","height":"190","type":"rich","url":"https://nyatla.hatenadiary.jp/entry/20200509/1589025933","provider_url":"https://hatena.blog","published":"2020-05-09 21:05:33","categories":["Python"],"width":"100%"}