{"id":30664729,"url":"https://github.com/giocip/java_num7","last_synced_at":"2026-02-10T22:36:12.040Z","repository":{"id":310479404,"uuid":"1040004012","full_name":"giocip/JAVA_num7","owner":"giocip","description":"num7 - SUPREME PRECISION GENERAL PURPOSE ARITHMETIC-LOGIC DECIMAL LIBRARY PACKAGE FOR JAVA","archived":false,"fork":false,"pushed_at":"2025-11-29T11:47:38.000Z","size":513,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-30T11:06:00.969Z","etag":null,"topics":["android","astronomy","decimal-arithmetic","financial","linux","macos","school","windows"],"latest_commit_sha":null,"homepage":"https://github.com/giocip/JAVA_num7","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giocip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["giocip"]}},"created_at":"2025-08-18T10:07:52.000Z","updated_at":"2025-11-29T11:47:41.000Z","dependencies_parsed_at":"2025-08-18T12:24:01.006Z","dependency_job_id":"caa2bd6f-ec14-409f-bd26-b1da6457e85f","html_url":"https://github.com/giocip/JAVA_num7","commit_stats":null,"previous_names":["giocip/java_num7"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/giocip/JAVA_num7","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giocip%2FJAVA_num7","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giocip%2FJAVA_num7/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giocip%2FJAVA_num7/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giocip%2FJAVA_num7/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giocip","download_url":"https://codeload.github.com/giocip/JAVA_num7/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giocip%2FJAVA_num7/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29319697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","astronomy","decimal-arithmetic","financial","linux","macos","school","windows"],"created_at":"2025-08-31T19:51:07.262Z","updated_at":"2026-02-10T22:36:12.028Z","avatar_url":"https://github.com/giocip.png","language":"Java","funding_links":["https://github.com/sponsors/giocip"],"categories":[],"sub_categories":[],"readme":"# num7 - SUPREME PRECISION GENERAL PURPOSE ARITHMETIC-LOGIC DECIMAL LIBRARY PACKAGE FOR JAVA\n## _DESCRIPTION AND DOC_\n\n- _**`Num`**_ is a lightweight floating point numeric class in num7/Num.java file for arbitrary precision results with always supreme precision.\n\nEasy to use like school math and WITHOUT IEEE754 ISSUES or -0 FAILURES, it can be deployed  \nfor web e-commerce developing, accounting apps and general math programs included financial ones.  \nFairly portable to Python one (and vice-versa) also a jvm system can work with almost num7 capability.  \n\n---\n\n## Installation num7 package\n\n\n- To install _**`num7 package`**_ enter the following:\n\n  ```java\n  mkdir num7 //FROM YOUR OWN App.java BASE DIRECTORY CREATE num7 FOLDER\n  cp Num.java num7 //PUT Num.java FILE INSIDE num7 FOLDER\n  ```\n\n- Ok!\n\n---\n\n\n## Installation num7 package by MAVEN REPOSITORY:\n\n[num7 package](https://mvnrepository.com/artifact/io.github.giocip/num7)\n\n---\n\n## HOW TO USE (integer numeric strings (ex. \"2.0\") MUST BE SUFFIXED WITH .0): \n--- CALCULATOR MODE ---   \n\n\timport num7.Num; \n\tpublic class App { \n\t public static void main(String[] args) { \n\t  /* ADDITION           */ Num.add(\"2.5\", \"3.6\").Print(\" = 2.5 + 3.6 (ADDITION)\\n\"); //6.1 = 2.5 + 3.6 (ADDITION)                 \n\t  /* SUBTRACTION        */ Num.sub(\"2.5\", \"3.6\").Print(\" = 2.5 - 3.6 (SUBTRACTION)\\n\"); //-1.1 = 2.5 - 3.6 (SUBTRACTION)               \n\t  /* MULTIPLICATION     */ Num.mul(\"2.5\", \"3.6\").Print(\" = 2.5 * 3.6 (MULTIPLICATION)\\n\"); //9.0 = 2.5 * 3.6 (MULTIPLICATION)                \n\t  /* DIVISION           */ Num.div(\"2.5\", \"3.6\").Print(\" = 2.5 / 3.6 (DIVISION)\\n\"); //(DIVISION) 0.69444444444444444444444444444444444444444444444444444444444444444444444444444444 = 2.5 / 3.6 \n\t  /* DIVISION REMAINDER */ Num.mod(\"11.0\", \"8.0\").Print(\" = 11 % 8 (DIVISION REMAINDER)\\n\"); //3.0 = 11 % 8 (DIVISION REMAINDER)               \n\t  /* DIVISION REMAINDER */ Num.mod(\"11.0\", \"8.0\").Print(\" = 11 % 8 (DIVISION REMAINDER)\\n\"); //3.0 = 11 % 8 (DIVISION REMAINDER)               \n\t  /* INV                */ Num.inv(\"3.0\").Print(\" = 1 / 3 (INV)\\n\");  //0.33333333333333333333333333333333333333333333333333333333333333333333333333333333 = 1 / 3 (INV)                \n\t  /* x2                 */ Num.x2(\"3.0\").Print(\" = 3 ^ 2 (x2)\\n\");   //9.0 = 3 ^ 2 (x2)\n\t  /* x3                 */ Num.x3(\"3.0\").Print(\" = 3 ^ 3 (x3)\\n\");  //27.0 = 3 ^ 3 (x3)\n\t  /* POWER              */ Num.xy(\"3.14\", \"8.0\").Print(\" = 3.14 ^ 8 (POWER)\\n\");  //9450.1169810786918656 = 3.14 ^ 8 (POWER)\n\t  /* POWER OF TEN       */ Num._10y(6).Print(\" = 10^6 (TEN POWER)\\n\");           //1000000.0 = 10^6 (TEN POWER)\n\t  /* POWER OF TWO       */ Num._2y(5).Print(\" = 2^5 (TWO POWER)\\n\");            //32.0 = 2^5 (TWO POWER)\n\t  /* POWER OF e         */ Num._ey(5).Round(29).Print(\" = e^5 (e POWER)\\n\");   //148.41315910257660342111558004056 = e^5 (e POWER)\n\t  /* FACTORIAL          */ Num P = new Num(Num.fact(5)); P.Print(\" = 5! (FACTORIAL)\\n\");//120.0 = 5! (FACTORIAL)\n\t  /* BINARY             */ Num.print(new Num(257).toBin(), \" =\u003e BINARY\\r\\n\");//100000001 =\u003e BINARY\n\t  /* HEXADECIMAL        */ Num.print(new Num(257).toHex(), \" =\u003e HEXADECIMAL\\r\\n\"); //101 =\u003e HEXADECIMAL\n\t  /* SQUARE ROOT        */ Num.sqrt(\"2.0\").Print(\" (SQUARE ROOT OF 2)\\n\"); \t      //1.4142135623 (SQUARE ROOT OF 2)        \n\t  /* ROUND 2 DIGITS     */ Num.round(Num.sqrt(\"2.0\")).Print(\" = SQUARE ROOT OF 2 (ROUND 2 DIGITS)\\n\");            //1.41 = SQUARE ROOT OF 2 (ROUND 2 DIGITS) \n\t  /* ROUND 4 DIGITS     */ Num.round(\"3.14159265\", 7).Print(\" =~ 3.14159265 (ROUND 7 DIGITS)\\n\"); \t             //3.1415927 =~ 3.14159265 (ROUND 7 DIGITS)\n\t  /* ROUND BANKING      */ Num.round_bank(\"3.14159265\", 7).Print(\" =~ 3.14159265 (ROUND BANKING 7 DIGITS)\\n\");  //3.1415926 =~ 3.14159265 (ROUND BANKING 7 DIGITS)\n\t  /* ABS                */ Num.abs(\"-5.25\").Print(\" (ABSOLUTE VALUE OF -5.25)\\n\"); \t\t            //5.25 (ABSOLUTE VALUE OF -5.25)\n\t  /* SCIENTIFIC         */ Num.print(new Num(\"314.0e-2\").toEXP()); Num.print(\" (SCI) = 3.14\\r\\n\"); //3.14e0 (SCI) = 3.14\n\t  /* pi                 */ Num.print(Num.pi(), \" (pi)\\n\"); \t\t\t\t\t\t  //3.1415926535897932384626433832795 (pi)\n\t  /* e                  */ Num.print(Num.e(), \" (e)\\n\");  \t\t\t\t\t\t  //2.7182818284590452353602874713527 (e)\n\t  /* 10 TIME VALUE      */ Num._10x(\"5.25\").Print(\" (10 TIME VALUE OF 5.25)\\n\");                      //52.5 (10 TIME VALUE OF 5.25\n\t  /* 100 TIME VALUE     */ Num._100x(\"5.25\").Print(\" (100 TIME VALUE OF 5.25)\\n\");                   //525.0 (100 TIME VALUE OF 5.25)\n\t  /* 1000 TIME VALUE    */ Num._1000x(\"5.25\").Print(\" (1000 TIME VALUE OF 5.25)\\n\");                //5250.0 (1000 TIME VALUE OF 5.25)\n\t  /* DIVIDE FOR 10      */ Num._10div(\"5.25\").Print(\" (DIVISION FOR TEN OF 5.25)\\n\");              //0.525 (DIVISION FOR TEN OF 5.25)\n\t  /* DIVIDE FOR 100     */ Num._100div(\"5.25\").Print(\" (DIVISION FOR HUNDRED OF 5.25)\\n\");        //0.0525 (DIVISION FOR HUNDRED OF 5.25)\n\t  /* DIVIDE FOR 1000    */ Num._1000div(\"5.25\").Print(\" (DIVISION FOR THOUSAND OF 5.25)\\n\");     //0.00525 (DIVISION FOR THOUSAND OF 5.25)\n\t  /* PERCENTAGE         */ Num.pct(\"3.725\", \"150.00\").Round(2).Print(\" = 3.725% OF 150 (PERCENTAGE)\\n\");         //5.59 = 3.725% OF 150 (PERCENTAGE)\n\t  /* PERTHOUSAND        */ Num.pth(\"2.00\", \"20_000.00\").Round(2).Print(\" = 2PTH OF 20000 (PERTHOUSAND)\\n\");    //40.0 = 2PTH OF 20000 (PERTHOUSAND)\n\t  /* SPIN-OFF           */ Num.f_price_spinoff(\"1_299.00\", \"22.00\").Round(2).Print(\" = (-22%) 1299 (SPIN-OFF)\\n\"); \t//1064.75 = (-22%) 1299 (SPIN-OFF)\n\t  /* SPIN-ON            */ Num.f_price_over(\"1_064.75\", \"22.00\").Round(2).Print(\" = +22% OF 1064.75 (SPIN-ON)\\n\"); //1299.0 = +22% OF 1064.75 (SPIN-ON)\n      /* HYPOT              */ Num.hypot(\"3.0\",\"5.0\", 40).Print(\"\\r\\n\"); //5.8309518948453004708741528775455830765213\n\t  Num.print(\"----------------------\\n\"); //---------------------- \n\t  Num[] cart = { new Num(\"19.31999\"), new Num(\"19.32\"), new Num(\"18.37\"), new Num(\"-15.13\"), new Num(\"-15.12\") }; \n\t  for (Num element : cart) Num.print(element, \" \"); Num.print(\"=\u003e ELEMENTS\\r\\n\"); //19.31999 19.32 18.37 -15.13 -15.12 =\u003e ELEMENTS\n\t  /* SUM   */ Num.print(Num.sum(cart), \" =\u003e SUM\\r\\n\");       //26.75999 =\u003e SUM\n\t  /* MEAN  */ Num.print(Num.mean(cart).Round(), \" =\u003e MEAN\\r\\n\"); //5.35 =\u003e MEAN\n\t  /* MIN   */ Num.print(Num.min(cart), \" =\u003e MIN\\r\\n\");         //-15.13 =\u003e MIN\n\t  /* MAX   */ Num.print(Num.max(cart), \" =\u003e MAX\\r\\n\");          //19.32 =\u003e MAX\n\t  /*MIN MAX*/ Num.print(Num.minmax(cart), \" =\u003e MIN-MAX\\r\\n\"); //[-15.13, 19.32] =\u003e MIN-MAX\n   \t  /*SUM MEAN MIN MAX*/ Num.print(Num.suminmax(cart), \" =\u003e SUM-MEAN-MIN-MAX\\r\\n\"); //[26.75999, 5.351998, -15.13, 19.32] =\u003e SUM-MEAN-MIN-MAX\n\t  Num.print(\"----------------------\\n\"); //---------------------- \n\t  /* FORMAT  */ Num.printf(\"3005.141592654\", 9, true, \"\\r\\n\");   //3.005,141592654\n\t  /* FORMAT  */ Num.printf(\"3005.141592654\", 6, false, \"\\r\\n\"); //3,005.141593\n\t  /* FORMAT  */ Num.printf(\"3005.941592654\", 0, true, \"\\r\\n\"); //3.006\n\t  Num.print(\"----------------------\\n\"); \n\t  Num.print(\"*** num7.Num CHEATING TABLE FUNCTIONS LIBRARY ***\\r\\n\");  \n\t }\n    }\n\t\n## CODING:  \n \n(=) assignment:  \n\n\tNum a = new Num(\"3.0\"); Num b = new Num(\"5.0\"); Num c = new Num(\"0.0\"); \n\tNum.print(\"a = \", a.toString(), \"  b = \");\n\tNum.print(b.toString(), \"  c = \", c.toString()); //a = 3.0 b = 5.0 c = 0.0 \n\n(+) adding:  \n\n\tNum R = a.Add(b).Add(c); Num.print(\"\\r\\n\", R.toString()); //8.0  \n\ta = new Num(\"0.1\"); b = new Num(\"0.2\"); c = new Num(\"0.0\"); Num.print(\"\\r\\n\", a.Add(b).Add(c).toString()); //0.3  \n\n(-) subtracting:  \n\n\ta = new Num(\"0.1\"); b = new Num(\"0.2\"); c = new Num(\"0.3\");  \n\tNum.print(\"\\r\\n\", a.Add(b).Sub(c).toString()); //0.0  \n\tR = new Num(\"-3.99\").Sub(new Num(\"-5.20\")).Sub(new Num(\"+3.01\")); Num.print(\"\\r\\n\", R.toString()); //-1.8  \n \n(*) multiplying:  \n\n\tNum.print(\"\\r\\n\", new Num(\"-3.99\").Mul(new Num(\"-5.20\")).Mul(new Num(\"+3.01\")).toString()); //-3.99 * (-5.20) * (+3.01 ) = new Num(\"62.45148\")\n\n(/) dividing (80 decimal digits default gets only for division operation):  \n\n\tNum.print(\"\\r\\n\", new Num(\"3.0\").Div(new Num(\"5.7\")).toString()); //3 : 5.7 = new Num(\"0.52631578947368421052631578947368421052631578947368421052631578947368421052631578\")  \n\nDivision precision (ex. 128 decs) may be specified as parameter after numeric string as: \n \t    \n\tNum.print(\"\\r\\n\", new Num(\"3.0\", 128).Div(new Num(\"5.7\", 128)).toString()); //3 : 5.7 = new Num(\"0.52631578947368421052631578947368421052631578947368421052631578947368421052631578947368421052631578947368421052631578947368421052\")  \n\n(// % operators by divmod function) integer division and remainder:  \n\n\ta = new Num(\"14.0\"); b = new Num(\"4.0\"); //  \n\tNum QR[] = Num.divmod(a, b); Num.print(\"\\r\\nQuotient = \", QR[0].toString()); Num.print( \"\\r\\nRemainder = \", QR[1].toString());   //Quotient = 3.0 Remainder = 2.0  \n\n(divmod function) floating division and remainder:  \n\n\ta = new Num(\"10.123456789\"); b = new Num(\"2.0\"); // \n\tQR = Num.divmod(a, b); Num.print(\"\\r\\nQuotient = \", QR[0].toString()); Num.print(\"\\r\\nRemainder = \", QR[1].toString());   //Quotient = 5.0 Remainder = 0.123456789  \n\n(sqrt) square root function: \n\n\ta = new Num(\"123_456_789.1234567890123456789\"); Num root = a.Sqrt(); // new Num(\"11111.1110661111\")  \n\tNum.print(\"\\r\\nresult digits number Array =\u003e \"); Num.print(root.Len()[0], \" \"); Num.print(root.Len()[1]); //result digits number Array =\u003e 5 10  \n\n(**) power pow function:  \n\n\tNum.print(\"\\r\\n\");\n\ta = new Num(\"2.22123\").Pow(64); Num.print(a.toString()); // 15204983311631674774944.65147209888660757554174463321311015807893679105748958794491681177995203669698667160837739445605536688871012507194541849848681968140805876570485027380472936734094801420552285940765338219588362327695177798251793912104057999943308320501195784173135380826413054938730768027747418766018606636039075568645106645889100039914241  \n\tNum.print(\"\\r\\n\");\n\tNum.print(a.Len()[0], \" \"); Num.print(a.Len()[1]);     //(23, 320) digits len Array  \n\tNum.print(\"\\r\\n\");\n\tNum.print(new Num(Num.PI).toString(), \"\\r\\n\");              //3.1415926535897932384626433832795\n\tNum.print(Num.pow(new Num(Num.PI), 8).toString(), \"\\r\\n\"); //9488.53101607057400712857550390669610772775299223490285321770379105987141030240149336078150385043158469349154685725483405285555113328286167973377675298803815055897927366999722001973502924844693920864092029684743210236562107994363509552636547934500390625\n\nlogic in, not in, is, is not, LT, LE, GT, GE, EQ, NE and relational operators (and, or, not).  \n\n(in):  \n\n\tNum L[] = { new Num(\"0.1\"), new Num(\"1.0\"), new Num(\"5.5\"), new Num(\"-3.0\"), new Num(\"-2.9\"), new Num(\"-3.0001\"), new Num(\"2.2\") };  \n\tNum.print(\"--------------------------\\r\\n\");\n\tNum.print(Num.in(L, new Num(\"-3.0001\")), \"\\r\\n\");   //true\n\tNum.print(Num.in(L, new Num(\"-3.00001\")), \"\\r\\n\"); //false\n\tNum.print(Num.in(L, new Num(\"-3.0001\")), \"\\r\\n\"); //true\n\n(not_in):\n\n\tNum.print(\"--------------------------\\r\\n\");\n\tNum.print(Num.not_in(L, new Num(\"-3.0001\")), \"\\r\\n\");   //false\n\tNum.print(Num.not_in(L, new Num(\"-3.00001\")), \"\\r\\n\"); //true\n\tNum.print(Num.not_in(L, new Num(\"-3.0001\")), \"\\r\\n\"); //false\n\n(is, is_not):\n\n\tNum.print(\"--------------------------\\r\\n\");\n\tNum M = new Num(\"0.0\"); \n\tNum.print(Num.is(new Num(\"0.0\"), M), \"\\r\\n\");     //true\n\tM = new Num(\"0.0\"); \n\tNum.print(Num.is_not(M.Inc(\"0.1\"), M), \"\\r\\n\"); //false\n\tNum N = M; N.Dec(\"0.1\"); \n\tNum.print(Num.is(N, M), \"\\r\\n\");  \t  //true\n\tNum.print(Num.is_not(N, M), \"\\r\\n\"); //false\n\n LT, LE, GT, GE, EQ, NE (\u003c \u003c= \u003e \u003e= == !=)\n\n\tNum.print(\"--------------------------\\r\\n\");\n\ta = new Num(\"0.0\"); b = new Num(\"0.1\"); c = new Num(\"-0.2\");\n\tNum.print(a.LT(b), \" \"); Num.print(a.LT(c), \" \"); Num.print(b.LT(c), \"\\r\\n\");    //true false false \n\tNum.print(a.LE(b), \" \"); Num.print(a.LE(c), \" \"); Num.print(b.LE(c), \"\\r\\n\");   //true false false \n\tNum.print(a.GT(b), \" \"); Num.print(a.GT(c), \" \"); Num.print(b.GT(c), \"\\r\\n\");  //false true true \n\tNum.print(a.GE(a), \" \"); Num.print(a.GE(c), \" \"); Num.print(b.GE(c), \"\\r\\n\"); //true true true \n\tNum.print(c.EQ(new Num(\"-2.0\").Mul(b)), \" \"); Num.print(a.EQ(c.Add(b.Mul(\"2.0\"))), \" \"); Num.print(a.NE(a.Add(b).Add(c)), \"\\r\\n\"); //true true true \n\tNum.print(a.And(b), \" \"); Num.print(a.Or(b), \" \"); Num.print(a.Not(), \"\\r\\n\"); //false true true \n\tNum.print(a.And(b) ? true : false, \"\\r\\n\");  //false\n\tNum.print(a.Or(b)  ? true : false, \"\\r\\n\"); //true\n\n  (+ - unary operators)\n\n\tNum.print(\"--------------------------\\r\\n\");\n\ta = new Num(\"2.5521\"); //Num { type: \"Num\", n2: \"\", n0: \"2\", n1: \"5521\", L_n0: 1, L_n1: 4, n: \"2.5521\", d: 80 }\n\tNum.print(a.toString(), \"\\r\\n\");               //2.5521\n\tNum.print(a.Minus().toString(), \"\\r\\n\");      //-2.5521\n\tNum.print(a.Plus().toString(), \"\\r\\n\");      //2.5521\n\tNum.print(a.Invsign().toString(), \"\\r\\n\");  //-2.5521\n\tNum.print(a.Invsign().toString(), \"\\r\\n\"); //2.5521\n\n  bitwise operators code:\n\n\tNum.print(\"--- (\u0026) AND ---\\r\\n\");\n\tNum op1 = new Num(\"3.0\");\n\tNum op2 = new Num(\"5.0\");\n\tNum.print(\"000000\"); Num.print(op1.toBin(), \" =\u003e 3.0\\r\\n\"); //00000011 =\u003e 3.0\n\top1 = op1.Andb(op2); \t\t\t\t\t\t\t\t\t\t//AND\n\tNum.print( \"00000\"); Num.print(op2.toBin(), \" =\u003e 5.0\\r\\n\"); //00000101 =\u003e 5.0\n\tNum.print(\"0000000\");Num.print(op1.toBin(), \" =\u003e 1.0\\r\\n\"); //00000001 =\u003e 1.0\n\n\tNum.print(\"--- (|) OR  ---\\r\\n\");\n\tNum op1 = new Num(\"3.0\");\n\tNum op2 = new Num(\"5.0\");\n\tNum.print(\"000000\"); Num.print(op1.toBin(), \" =\u003e 3.0\\r\\n\"); //00000011 =\u003e 3.0\n\top1 = op1.Orb(op2); \t\t\t\t\t\t\t\t\t\t//OR\n\tNum.print( \"00000\"); Num.print(op2.toBin(), \" =\u003e 5.0\\r\\n\"); //00000101 =\u003e 5.0\n\tNum.print( \"00000\"); Num.print(op1.toBin(), \" =\u003e 7.0\\r\\n\"); //00000111 =\u003e 7.0\n\n\tNum.print(\"--- (^) XOR ---\\r\\n\");\n\tNum op1 = new Num(\"3.0\");\n\tNum op2 = new Num(\"5.0\");\n\tNum.print(\"000000\"); Num.print(op1.toBin(), \" =\u003e 3.0\\r\\n\"); //00000011 =\u003e 3.0\n\top1 = op1.Xorb(op2); \t\t\t\t\t\t\t\t\t\t//XOR\n\tNum.print( \"00000\"); Num.print(op2.toBin(), \" =\u003e 5.0\\r\\n\"); //00000101 =\u003e 5.0\n\tNum.print( \"00000\"); Num.print(op1.toBin(), \" =\u003e 6.0\\r\\n\"); //00000110 =\u003e 6.0\n\n\tNum.print(\"--- (\u003c\u003c) LEFT SHIFT -X10 MULTIPLIER ---\\r\\n\");\n\tNum op1 = new Num(\"1.0\");\n\tNum op2 = new Num(\"2.0\");\n\tNum.print(\"0000000\"); Num.print(op1.toBin(), \" =\u003e 1.0\\r\\n\");  //00000001 =\u003e 1.0\n\top1 = op1.Shift(op2); \t\t\t\t\t\t\t\t\t\t  //LEFT SHIFT -X10 MULTIPLIER\n\tNum.print( \"000000\"); Num.print(op2.toBin(), \" =\u003e 2.0\\r\\n\");  //00000010 =\u003e 2.0\n\tNum.print(      \"0\"); Num.print(op1.toBin(), \" =\u003e 100.0\\r\\n\");//01100100 =\u003e 100.0\n\n\tNum.print(\"--- (\u003e\u003e) RIGHT SHIFT -X10 DIVIDER ---\\r\\n\");\n\tNum op1 = new Num(\"250.0\");\n\tNum op2 = new Num(\"-1.0\");\n\tNum.print(\"\"); Num.print(op1.toBin(), \" =\u003e 250.0\\r\\n\");                //11111010 250.0 \n\top1 = op1.Shift(op2); \t\t\t\t\t\t\t\t\t\t           //RIGHT SHIFT -X10 DIVIDER\n\tNum.print( \"      \"); Num.print(op2.toBin(), \" =\u003e -1 (decimal)\\r\\n\");  //-1 (decimal)\n\tNum.print(      \"000\"); Num.print(op1.toBin(), \" =\u003e 25.0\\r\\n\");        //00011001 25.0\n\n\tNum.print(\"--- (~) NOT ---\\r\\n\");\n\tNum op1 = new Num(\"10.0\");\n\tNum op2 = new Num(\"0.0\");\n\tNum.print(\"0000\"); Num.print(op1.toBin(), \" =\u003e 10.0\\r\\n\"); //00001010 10.0 \n\top2 = op1.Notb(); \t\t\t\t\t\t\t\t\t\t   //(~) NOT \n\tNum.print(\"00000\"); Num.print(op2.toBin(), \" =\u003e 5.0\\r\\n\"); //00000101 5.0  \n\n On a given variable the following arithmetic methods are available:\n\t\n\tNum a = new Num(\"10.25\");  \n\tNum.print(a.toString(), \"\\r\\n\");           //10.25  \n\ta.Inc();        \t\t\t\t\t\t  //increment (default) by one  \n\tNum.print(a.toString(), \"\\r\\n\");         //11.25   \n\ta.Dec(2);       \t\t\t\t\t\t//decrement (optional) 2 units  \n\tNum.print(a.toString(), \"\\r\\n\");       //9.25  \n\ta.IncMul();     \t\t\t\t\t  //multiply (default) 10 times  \n\tNum.print(a.toString(), \"\\r\\n\");     //92.5  \n\ta.DecDiv(100);  \t\t\t\t\t//x100 (optional) division  \n\tNum.print(a.toString(), \"\\r\\n\");   //0.925  \n\ta.Clear();     \t\t\t\t\t  //a variable set to zero   \n\tNum.print(a.toString(), \"\\r\\n\"); //0.0 \n\nEVEN ODD numbering methods:\n\t\n\tNum a = new Num(6); Num b = new Num(3); Num c = new Num(\"3.14\");\n\tNum.print(a, \"  INTEGER =\u003e \"); Num.print(a.Is_numint(), \" \"); Num.print(\"EVEN =\u003e \") ; Num.print(a.Is_numeven(), \"\\r\\n\");  //6.0 INTEGER =\u003e true EVEN =\u003e true  \n\tNum.print(b, \"  INTEGER =\u003e \"); Num.print(b.Is_numint(), \" \"); Num.print(\"ODD  =\u003e \"); Num.print(b.Is_numodd(), \"\\r\\n\");   //3.0  INTEGER =\u003e true ODD  =\u003e true \n\tNum.print(c, \" FLOAT  =\u003e \"); Num.print(c.Is_numfloat(), \"\\r\\n\");               \t\t\t\t\t\t\t\t\t\t    //3.14  FLOAT   =\u003e true     \n\n# Advanced logic programming snippet\n\nLOOP EXAMPLE \u003e\n\n\tNum i = new Num(0);\n\twhile (i.LT(new Num(\"1.0\"))) {\n\t\ti.Inc(\"0.1\");                   //i += Num(\"0.1\")\n\t\tif (i.LE(new Num(\"0.5\"))) continue;\n\t\tNum.print(i.toString(), \" \"); //0.6 0.7 0.8 0.9 1.0  \n\t} \n\twhile (i.Is_true()) {\n\t\ti.Dec(\"0.1\");                   //i -= Num(\"0.1\") \n\t\tif (i.GE(new Num(\"0.5\"))) continue;\n\t\tNum.print(i.toString(), \" \"); //0.4 0.3 0.2 0.1 0.0  \n\t} \n\nROUNDING AND ACCOUNTING \u003e\n\n\tNum p = new Num(\"11.19\");                         //PRICE -Toslink cable for soundbar  \n\tNum pd = Num.round(p.F_price_over(-7));          //PRICE DISCOUNTED 7%\n\tNum d = Num.round(p.Sub(pd));                   //DISCOUNT\n\tNum p_noTAX = Num.round(p.F_price_spinoff(22));//ITEM COST WITHOUT TAX 22%  \n\tNum TAX = Num.round(p.Sub(p_noTAX));          //TAX 22% \n\tNum.print(\"price=\" + pd.toString() + \" discount=\" + d.toString() + \" COST=\" + p_noTAX.toString() + \" TAX=\" + TAX.toString()); //price=10.41 discount=0.78 COST=9.17 TAX=2.02\n\nOUTPUT FORMATTING AND LOCALIZATION \u003e\n\n\timport num7.Num;\n\timport java.text.NumberFormat;\n\timport java.util.Locale;\n\t\n\tpublic class App {\n\t    public static void main(String[] args) {\n\t\t\tNumberFormat US = NumberFormat.getCurrencyInstance(Locale.US);\n\t\t\tNumberFormat IT = NumberFormat.getCurrencyInstance(Locale.ITALY);\n\t\t\tdouble amount = 1234567.89;\n\t\t\tNum.print(US.format(amount), \"\\r\\n\");  \t\t\t\t\t\t\t //$1,234,567.89\n\t\t\tNum.print(IT.format(amount), \"\\r\\n\"); \t\t\t\t\t\t\t//1.234.567,89 €\n\t\t\tNum asset = new Num(\"100_000.0\"); Num rate = new Num(\"6.5\"); Num years = new Num(\"20.0\");\n\t\t\tNum monthly_payment = Num.f_fund_fr(asset, rate, years.toInt()).Round(); \n\t\t\tNum.print(US.format(asset.toDouble()), \"\\r\\n\");              //$100,000.00\n\t\t\tNum.print(US.format(monthly_payment.toDouble()), \"\\r\\n\");   //$756.30\n\t\t\tNum.print(IT.format(asset.toDouble()), \"\\r\\n\"); \t\t   //100.000,00 €\n\t\t\tNum.print(IT.format(monthly_payment.toDouble()), \"\\r\\n\"); //756,30 €\n\t    }\n\t}\n\nROUNDING TYPES \u003e\n\n\timport num7.Num;\n\n\tpublic class App {\n\t\tpublic static void main(String[] args) {\n\t\t\t//\"\"\" Num floor rounding \"\"\"  \n\t\t\tNum.print(\"--------------------------\\r\\n\" + \" Num floor rounding\\r\\n\"); \n\t\t\tNum n = new Num(Num.PI);                        // 3.1415926535897932384626433832795\n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round_floor(2).toString(), \"\\r\\n\"); // 3.14  \n\t\t\tn = new Num(Num.PI).Invsign();                  //-3.1415926535897932384626433832795 \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round_floor(2).toString(), \"\\r\\n\"); //-3.15\n\t\t\tn = new Num(Num.PI).Sub(3);                     // 0.1415926535897932384626433832795  \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round_floor(2).toString(), \"\\r\\n\"); // 0.14  \n\t\t\tn = new Num(Num.PI).Invsign().Add(3);           //-0.1415926535897932384626433832795  \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round_floor(2).toString(), \"\\r\\n\"); //-0.15  \n\t\t\t\n\t\t\t//\"\"\" Num ceil rounding \"\"\"  \n\t\t\tNum.print(\"--------------------------\\r\\n\" +  \" Num ceil rounding\\r\\n\");  \n\t\t\tn = new Num(Num.PI);                            // 3.1415926535897932384626433832795 \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round_ceil(2).toString(), \"\\r\\n\"); //3.15 \n\t\t\tn = new Num(Num.PI).Invsign();                  //-3.1415926535897932384626433832795  \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round_ceil(2).toString(), \"\\r\\n\"); //-3.14\n\t\t\tn = new Num(Num.PI).Sub(3);                     // 0.1415926535897932384626433832795 \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round_ceil(2).toString(), \"\\r\\n\"); //0.15 \n\t\t\tn = new Num(Num.PI).Invsign().Add(3);           //-0.1415926535897932384626433832795 \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round_ceil(2).toString(), \"\\r\\n\"); //-0.14 \n\t\t\t\n\t\t\t//\"\"\" Num standard rounding \"\"\"  \n\t\t\tNum.print(\"--------------------------\\r\\n\" +  \" Num standard rounding\\r\\n\");\n\t\t\tn = new Num(Num.PI);                            // 3.1415926535897932384626433832795 \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round(4).toString(), \"\\r\\n\"); //3.1416\n\t\t\tn = new Num(Num.PI).Invsign();                  //-3.1415926535897932384626433832795  \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round(4).toString(), \"\\r\\n\"); //-3.1416\n\t\t\tn = new Num(Num.PI).Sub(3);                     // 0.1415926535897932384626433832795 \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round(4).toString(), \"\\r\\n\"); //0.1416\n\t\t\tn = new Num(Num.PI).Invsign().Add(3);           //-0.1415926535897932384626433832795 \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round(4).toString(), \"\\r\\n\"); //-0.1416 \n\t\t\t\n\t\t\t//\"\"\" Num half even rounding \"\"\"  \n\t\t\tNum.print(\"--------------------------\\r\\n\" +   \" Num half to even rounding (statistic, zero symmetric)\\r\\n\");  \n\t\t\tn = new Num(Num.PI).Round_floor(4) ;             \t\t\t\t\t\t// 3.1415  \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round_bank(3).toString(), \"\\r\\n\") ;   // 3.142  \n\t\t\tn = new Num(Num.PI).Round_floor(4).Invsign(); \t\t\t\t\t\t\t//-3.1415  \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round_bank(3).toString(), \"\\r\\n\");    //-3.142  \n\t\t\tn = new Num(Num.PI).Sub(3).Round_floor(8);              \t\t\t\t// 0.14159265  \n\t\t\tNum.print(n, \"\\r\\n\"); Num.print(n.Round_bank(7).toString(), \"\\r\\n\");    // 0.1415926  \n\t\t\tn = new Num(Num.PI).Round_floor(8).Invsign().Add(3); \t\t\t\t\t//-0.14159265  \n\t\t\tNum.print(n, \"\\r\\n\");Num.print(n.Round_bank(7).toString(), \"\\r\\n\");     //-0.1415926  \n\t\t}\n\t}\n\nPERFORMANCE EVALUATION AND SQUARENESS \u003e\n\n\timport num7.Num;\n\n\tpublic class App {\n\t\tpublic static void main(String[] args) {\n\n\t\t\t\t\tlong tic = System.nanoTime();             //Start Time \n\t\t\t\t\tNum a = new Num(\"-1.123456789\"+\"e-100\"); //Calculating division 10**100 assignment time by exponential notation... \n\t\t\t\t\tlong toc = System.nanoTime();           //Stop Time\n\t\t\t\t\tNum T1 = new Num(((toc - tic) / 1000000.0) + \"\"); \n\t\t\t\t\tNum.print(\"a finished ms \"); Num.print(T1.Round(3), \"\\r\\n\"); //a finished ms 43.476\n\t\t\t\t\t\t\t\t\n\t\t\t\t\ttic = System.nanoTime();                      //Start Time\n\t\t\t\t\tNum b = new Num(\"-1.123456789\").Shift(-100); //Calculating division 10**100 assignment time by shift method...\n\t\t\t\t\ttoc = System.nanoTime();                    //Stop Time           \n\t\t\t\t\tNum T2 = new Num(((toc - tic) / 1000000.0) + \"\");\n\t\t\t\t\tNum.print(\"b finished ms \"); Num.print(T2.Round(3), \"\\r\\n\"); //b finished ms 4.124\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tNum[] R = Num.f_perf_time(T1, T2);\n\t\t\t\t\t\n\t\t\t\t\tNum.print(\"PCT =\u003e \", Num.round(R[0]).toString(), \"  \");  \n\t\t\t\t\tNum.print(\"SCALE =\u003e \", Num.round(R[1]).toString(), \"  \"); Num.print( \"SQUARENESS =\u003e \");\n\t\t\t\t\tNum.print(a.EQ(b), \"\\r\\n\"); //PCT =\u003e 974.46  SCALE =\u003e 9.74  SQUARENESS =\u003e true\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//stock exchange assets performance \n\t\t\t\t\tNum previous = new Num(\"26.96\"); Num now = new Num(\"27.27\"); \n\t\t\t\t\tNum var_pct = new Num(Num.f_perf(previous, now)).Round();\n\t\t\t\t\tNum.print((var_pct.GT(0) ? \"+\" : \"\"));\n\t\t\t\t\tNum.print(var_pct.Round(2), \"\\r\\n\"); //+1.15\n\t\t}\n\t} \n\n SCIENTIFIC NOTATION AND HIGH PRECISION RESULTS \u003e\n\n\timport num7.Num;\n\n\tpublic class App {\n\t\tpublic static void main(String[] args) {\n\n\t\t\t\t\tNum a = new Num(\"1_000_000_000_000_000_000_000.0\"); //standard notation  \n\t\t\t\t\tNum b = new Num(\"1.0e21\");                         //scientific notation  \n\t\t\t\t\tNum SUM = a.Add(b);                               //SUM  \n\t\t\t\t\tdouble ieee754 = a.toFloat() + b.toFloat();      //double\n\t\t\t\t\tNum.print(\"SUM == ieee754 \"); Num.print(SUM.EQ(new Num(ieee754 + \"\")), \"   \"); \n\t\t\t\t\tNum.print( \"SUM =\u003e \", SUM.Num2exp());          //SUM == ieee754 true   SUM =\u003e 2.0e21\n\n\t\t\t\t\ta = new Num(\"1_000_000_000_000_000_000_000.0\"); //standard notation  \n\t\t\t\t\tb = new Num(\"1.0e21\");                         //scientific notation  \n\t\t\t\t\tNum MUL = a.Mul(b);                           //MUL  \n\t\t\t\t\tieee754 = a.toFloat() * b.toFloat();         //double\n\t\t\t\t\tNum.print(\"\\r\\nMUL == ieee754 \");\n\t\t\t\t\tNum.print(MUL.EQ(new Num(ieee754 + \"\")), \"   MUL =\u003e \"); \n\t\t\t\t\tNum.print(MUL.Num2exp()); //MUL == ieee754 true   MUL =\u003e 1.0e42\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tString as = \"1.23456789\";  \n\t\t\t\t\tString bs = \"9.87654321\" ; \n\t\t\t\t\tMUL = new Num(as).Mul(new Num(bs)); //MUL                        \n\t\t\t\t\tieee754 = Double.parseDouble(as) * Double.parseDouble(bs);\n\t\t\t\t\tNum.print(\"\\r\\nMUL == ieee754 \");\n\t\t\t\t\tNum.print(MUL.EQ(new Num(ieee754 + \"\")), \"  MUL =\u003e \" + MUL.toString() + \"\\r\\n                             \"); \n\t\t\t\t\tNum.print(Double.parseDouble(as)*Double.parseDouble(bs), \" =\u003e IEEE754 PRECISION FAILURE!\"); //MUL == ieee754 False MUL =\u003e 12.1932631112635269 12.193263111263525 =\u003e IEEE754 PRECISION FAILURE!  \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tas = \"1.23456789e320\";  //scientific notation  \n\t\t\t\t\tbs = \"9.87654321e320\";   \n\t\t\t\t\tMUL = new Num(as).Mul(new Num(bs)); //MUL                      \n\t\t\t\t\tieee754 = Double.parseDouble(as) * Double.parseDouble(bs);\n\t\t\t\t\tNum.print(\"\\r\\nMUL != ieee754 \");\t\t\t\t\n\t\t\t\t\tNum.print(\"MUL =\u003e \", MUL.Num2exp() + \" \");\n\t\t\t\t\tNum.print(Double.parseDouble(as)*Double.parseDouble(bs), \" =\u003e IEEE754 Infinity FAILURE!\"); //MUL != ieee754 MUL =\u003e 1.21932631112635269e641 Infinity =\u003e IEEE754 Infinity FAILURE!\n\n\t\t\t\t\tas = \"2.0e320\";  //scientific notation  \n\t\t\t\t\tbs = \"3.0e-320\";   \n\t\t\t\t\tMUL = new Num(as).Mul(new Num(bs)); //MUL                      \n\t\t\t\t\tieee754 = Double.parseDouble(as) * Double.parseDouble(bs);\n\t\t\t\t\tNum.print(\"\\r\\nMUL != ieee754 \");\t\t\t\t\n\t\t\t\t\tNum.print(\"MUL =\u003e \", MUL + \" \");\n\t\t\t\t\tNum.print(Double.parseDouble(as)*Double.parseDouble(bs), \" =\u003e IEEE754 Infinity FAILURE!\"); //MUL != ieee754 MUL =\u003e 6.0 Infinity =\u003e IEEE754 Infinity FAILURE!\n\t\t\t\t\t\n\t\t\t\t\tas = \"1.0e200\"; //scientific notation  \n\t\t\t\t\tbs = \"5.0e1200\";  \n\t\t\t\t\tNum T1 = new Num(as); \n\t\t\t\t\tNum T2 = new Num(bs); \n\t\t\t\t\tNum DIV = T1.Div(T2); //DIV\n\t\t\t\t\tieee754 = Double.parseDouble(as) / Double.parseDouble(bs); //DIVISION\n\t\t\t\t\tNum.print(\"\\r\\nDIV != ieee754 \");\t\t\t\t\n\t\t\t\t\tNum.print(\"DIV =\u003e \", DIV.toEXP() + \" \");\n\t\t\t\t\tNum.print(Double.parseDouble(as)/Double.parseDouble(bs), \" =\u003e IEEE754 Infinity small FAILURE!\"); //DIV != ieee754 DIV =\u003e 2.0e-1001 0.0 =\u003e IEEE754 Infinity small FAILURE!\n\t\t\t\t\t\n\t\t}\n\t}\n\n SAVING CALCULATOR:\n\n\timport num7.Num;\n\timport java.text.NumberFormat;\n\timport java.util.Locale;\n\n\tpublic class App {\n\t\tpublic static void main(String[] args) {\n\n\t\t\tNumberFormat US = NumberFormat.getCurrencyInstance(Locale.US);\n\t\t\t\n\t\t\tNum DEPOSIT = new Num(\"10_000.00\");\n\t\t\tNum ANNUAL_CONTRIBUTION = new Num(\"1_000.00\");\n\t\t\tNum RATE = new Num(\"7.25\"); \n\t\t\tNum YEARS = new Num(10);\n\t\t\tNum ANNUALS[][] = new Num [10][4]; \n\t\t\tNum SQUARENESS_1 = new Num(0), SQUARENESS_2 = new Num(0), SQUARENESS_3  = new Num(0); \n\t\t\tfor (int i = 0; i \u003c YEARS.toInt(); i++) { \n\t\t\t\tANNUALS[i][0] = new Num(i + 1);   //year \n\t\t\t\tANNUALS[i][1] = DEPOSIT;         //DEPOSIT \n\t\t\t\tANNUALS[i][2] = DEPOSIT.Mul(RATE).Div(100).Round(); \n\t\t\t\tANNUALS[i][3] = ANNUALS[i][1].Add(ANNUALS[i][2]).Add(ANNUAL_CONTRIBUTION); \n\t\t\t\tDEPOSIT = ANNUALS[i][3]; \n\t\t\t} \t\n\t\t\tNum.print(\"---------------------------------------------------\\n\");  \n\t\t\tfor (int i = 0; i \u003c YEARS.toInt(); i++) { \n\t\t\t\tNum.print(ANNUALS[i][0].toInt(), \"\\t\"); //INDEX\n\t\t\t\tNum.print(US.format(ANNUALS[i][1].toDouble()), \"\\t\");\n\t\t\t\tif(ANNUALS[i][2].get_n0().length() \u003c 4) { Num.print(\"##\"); Num.print(US.format(ANNUALS[i][2].toDouble()) + \"\\t\"); }\n\t\t\t\telse Num.print(US.format(ANNUALS[i][2].toDouble()), \"\\t\");\n\t\t\t\tNum.print(US.format(ANNUALS[i][3].toDouble()), \"\\t\"); \n\t\t\t\tNum.print(\"\\r\\n\");\n\t\t\t} \n\t\t\t\n\t\t\tfor (int i = 0; i \u003c YEARS.toInt(); i++) { \n\t\t\t\tSQUARENESS_1 = SQUARENESS_1.Add(ANNUALS[i][1]);\n\t\t\t\tSQUARENESS_2 = SQUARENESS_2.Add(ANNUALS[i][2]);\n\t\t\t\tSQUARENESS_3 = SQUARENESS_3.Add(ANNUALS[i][3]);\n\t\t\t}\n\t\t\t\n\t\t\tNum.print(\"---------------------------------------------------\\n\"); \n\t\t\tNum.print(\"       \"); \n\t\t\tNum.print(US.format(SQUARENESS_1.toDouble()), \"     \");\n\t\t\tNum.print(US.format(SQUARENESS_2.toDouble()), \"      \");\n\t\t\tNum.print(US.format(SQUARENESS_3.toDouble()), \" \");\n\t\t\tBoolean SQUARENESS = (SQUARENESS_1.Add(SQUARENESS_2)).EQ(SQUARENESS_3.Sub(ANNUAL_CONTRIBUTION.Mul(YEARS)));\n\t\t\tNum.print(\" =\u003e SQUARENESS=\", (SQUARENESS ? \"SUCCESS\" : \"FAILURE\"), \"\\r\\n\");\n\t\t\t\t\t\n\t\t}\n\t}\n\n\t/* VIDEO OUTPUT\n\t---------------------------------------------------\n\t1\t$10,000.00\t##$725.00\t$11,725.00\t\n\t2\t$11,725.00\t##$850.06\t$13,575.06\t\n\t3\t$13,575.06\t##$984.19\t$15,559.25\t\n\t4\t$15,559.25\t$1,128.05\t$17,687.30\t\n\t5\t$17,687.30\t$1,282.33\t$19,969.63\t\n\t6\t$19,969.63\t$1,447.80\t$22,417.43\t\n\t7\t$22,417.43\t$1,625.26\t$25,042.69\t\n\t8\t$25,042.69\t$1,815.60\t$27,858.29\t\n\t9\t$27,858.29\t$2,019.73\t$30,878.02\t\n\t10\t$30,878.02\t$2,238.66\t$34,116.68\t\n\t---------------------------------------------------\n\t\t   $194,712.67     $14,116.68      $218,829.35  =\u003e SQUARENESS=SUCCESS\t*/\n\nFLOAT TO NUM CONVERSION LIST ARRAY \u003e\n\n\timport num7.Num;\n\timport java.util.ArrayList;\n\timport java.util.Arrays;\n\t\n\tpublic class App {\n\t\tpublic static void main(String[] args) {\n\t\n\t\t\tNum L[] = {new Num(1011), new Num(\"0.0\"), new Num(\"9.998412\"), new Num(\"7.0\"), new Num(\"0.123\"), new Num(\"-2.0123\"), new Num(10), new Num(6)};\n\t\t\tArrayList\u003cNum\u003e LN = new ArrayList\u003c\u003e(Arrays.asList(L));\n\t\t\tfor(Num i : LN) Num.print(i.n, \" \"); //1011.0 0.0 9.998412 7.0 0.123 -2.0123 10.0 6.0\n\t\t\t\t\t\n\t\t}\n\t}\n\nSAVE NUMERIC LIST TO DISK FILE \u003e\n\n\timport num7.Num;\n\timport java.util.ArrayList;\n\t\n\tpublic class App {\n\t\tpublic static void main(String[] args) {\n\t\n\t\t\tdouble[] D = { -110.0, +0.14, -20.456120, 1200.0654, 0.0, 3.141592654, 2.7182818281234567899 }; \n\t\t\tArrayList\u003cNum\u003e A = Num.float2num_list(D); \n\t\t\tfor(Num a : A) Num.print(a, \"\\r\\n\"); //-110.0 0.14 -20.45612 1200.0654 0.0 3.141592654 2.7182818281234566\n\t\t\tNum.f_filewrite(A, \"myFile.txt\");   //SAVED TO myFile.txt FILE\n\t\t\t\t\t\n\t\t}\n\t}\n\nREAD NUMERIC LIST ARRAY FROM DISK FILE (nums.txt default filename) \u003e\n\n\timport num7.Num;\n\n\tpublic class App {\n\t\tpublic static void main(String[] args) {\n\n\t\t\tNum.print(Num.f_fileread(\"myFile.txt\"), \"\\r\\n\"); //READING FILE myFile.txt =\u003e [-110.0, 0.14, -20.45612, 1200.0654, 0.0, 3.141592654, 2.7182818281234566] */\n\t\t\t\t\t\n\t\t}\n\t}\n\n### FAQ \n\nQ. I usually try to add 0.1 to 0.2 in node with this code:  \n\n\t\tNum.print(0.1 + 0.2, \"\\r\\n\");\nand the result is:  \n\n\u003e 0.30000000000000004  \n\nHow instead can it gets exactly 0.3?  \nA. Using Num class \u003e  \n\n\t\tNum.print(new Num(\"0.1\").Add(new Num(\"0.2\")).toString());  //0.3\n\nQ. I'll get an error when i usually type:  \n\t\n\tnew Num(0.1);    \n \nThe constructor Num(double) is undefined\n\nWhat is wrong?  \nA. You must use double quotes or string conversion:\n\n\t\tnew Num(\"0.1\");    \t\t   \t   //Num(\"0.1\")  \n\t\tnew Num(0.1 + \"\").toString(); //\"0.1\" \t\t\n\nQ. I have two float variables in my code:  \n\n\t\u003e double a = 0.1; double b = 0.2;  \n\t\nHow can i convert them in Num type?  \nA. With Num.float2num method (or directly with String() built-in function): \n\n\tdouble a = 0.1, b = 0.2;   \n\tNum an= Num.float2num(a); Num bn = Num.float2num(b); \n\tNum.print(an.Add(bn).toString(), \" =\u003e OK. VS  \"); Num.print(a+b, \" =\u003e PRECISION FAILURE!\"); //0.3 =\u003e OK. VS  0.30000000000000004 =\u003e PRECISION FAILURE!\n\nQ. Can i do add or other math operations also with 10,000 digits after floating point?  \nA. Yes, you can by the following:\n\n\tNum.print((new Num(\"1.123456789e-10_000\").Add(new Num(\"3.987654321e-10_000\"))).Num2exp(), \"\\r\\n\");     //5.11111111e-10000  \n\tNum.print((new Num(\"1.123456789e-10_000\").Sub(new Num(\"3.987654321e-10_000\"))).Num2exp(), \"\\r\\n\");    //-2.864197532e-10000  \n\tNum.print((new Num(\"1.123456789e-10_000\").Mul(new Num(\"3.987654321e-10_000\"))).Num2exp(), \"\\r\\n\");   //4.479957319112635269e-20000  \n\tNum.print((new Num(\"1.123456789e-10_000\").Div(new Num(\"3.987654321e-10_000\"))).toString(), \"\\r\\n\"); //0.281... (10011 digits)\n\nQ. I must enter many integer variables in my code:  \n\n\t\u003e Num a = new Num(\"123.0\"); Num b = new Num(\"456.0\"); Num c = new Num(\"789.0\");\n\t\nCan i input them without quotes and suffix .0?  \nA. Yes, this the way:\n\n\tNum a = new Num(123); Num b = new Num(456); Num c = new Num(789); \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiocip%2Fjava_num7","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiocip%2Fjava_num7","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiocip%2Fjava_num7/lists"}