Z24555

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z24555"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z24505",
        "Z14K3": {
            "Z1K1": "Z16",
            "Z16K1": "Z600",
            "Z16K2": "function Z24505( Z24505K1, Z24505K2 ) {\n\tfunction nat_sqrt( Z15256K1 ) {\n\t\tif(Z15256K1==0n){\n\t\t\treturn 0n;\n\t\t}\n\t\t//First estimate of square root by splitting in half its decimal representation\n\t\tlet x=BigInt(Z15256K1.toString().slice(0,Z15256K1.toString().length/2+1));\n\t\tlet x_next=x - (x*x-Z15256K1)/(2n*x);\n\t\twhile(x!=x_next \u0026\u0026 x!=x_next-1n){\n\t\t\t// Wikifunctions.Debug(\"x=\"+x)\n\t\t\t// Wikifunctions.Debug(\"x_next=\"+x_next)\n\t\t\tx=x_next;\n\t\t\tx_next=x-(x*x-Z15256K1)/(2n*x);\n\t\t}\n\t\treturn x*x\u003EZ15256K1 ? x-1n : x;\n\t}\n\tfunction Fraction(a,b){\n\t\treturn {K1:a,K2:b??1n};\n\t}\n\tfunction sum( Z19679K1, Z19679K2 ) {\n\t\tlet numerator = Z19679K1.K1 * Z19679K2.K2 + Z19679K2.K1 * Z19679K1.K2;\n\t\tlet denominator = Z19679K1.K2 * Z19679K2.K2;\n\t\treturn {\n\t\t\tK1: numerator,\n\t\t\tK2: denominator\n\t\t};\n\t}\n\tfunction subtract( Z19699K1, Z19699K2 ) {\n\t\tlet numerator = Z19699K1.K1 * Z19699K2.K2 - Z19699K2.K1 * Z19699K1.K2;\n\t\tlet denominator = Z19699K1.K2 * Z19699K2.K2;\n\t\treturn {\n\t\t\tK1: numerator,\n\t\t\tK2: denominator\n\t\t};\n\t}\n\tfunction mul( Z19706K1, Z19706K2 ) {\n\t\tlet numerator = Z19706K1.K1*Z19706K2.K1;\n\t\tlet denominator = Z19706K1.K2*Z19706K2.K2;\n\t\treturn {\n\t\t\tK1: numerator,\n\t\t\tK2: denominator\n\t\t};\n\t}\n\tfunction divide( Z19708K1, Z19708K2 ) {\n\t\tlet numerator = Z19708K1.K1*Z19708K2.K2;\n\t\tlet denominator = Z19708K1.K2*Z19708K2.K1;\n\t\treturn {\n\t\t\tK1: numerator,\n\t\t\tK2: denominator\n\t\t};\n\t}\n\tfunction abs(f){\n\t\treturn Fraction(f.K1\u003C0n ? -f.K1 : f.K1, f.K2);\n\t}\n\tfunction greater( Z19751K1, Z19751K2 ) {\n\t\treturn Z19751K1.K1*Z19751K2.K2 \u003E Z19751K2.K1*Z19751K1.K2\n\t}\n\tconst numerator=Z24505K1.K1;\n\tconst denominator=Z24505K1.K2;\n\tconst sqrt_numerator = nat_sqrt(numerator);\n\tconst sqrt_denominator = nat_sqrt(denominator);\n\tif (numerator == sqrt_numerator*sqrt_numerator \u0026\u0026 \n\t\tdenominator == sqrt_denominator*sqrt_denominator)\n\t\t\treturn Fraction(sqrt_numerator,sqrt_denominator);\n\t\n\tlet x=Fraction(sqrt_numerator, sqrt_denominator);\n\t\t// Wikifunctions.Debug(\"x= \"+x)\n\tlet x_next = subtract(x, divide(subtract(mul(x,x),Z24505K1),mul(Fraction(2n),x)));\n\t\t// Wikifunctions.Debug(\"x= \"+x.K1+\"/\"+x.K2+\"; x_next=\"+x_next.K1+\"/\"+x_next.K2)\n\t\n\twhile(greater(abs(subtract(x,x_next)), Z24505K2)){\n\t\t// Wikifunctions.Debug(\"x= \"+x.K1+\"/\"+x.K2+\"; x_next=\"+x_next.K1+\"/\"+x_next.K2)\n\t\tx=x_next;\n\t\tx_next=subtract(x, divide(subtract(mul(x,x),Z24505K1),mul(Fraction(2n),x)));\n\t}\n\treturn x_next;\n}"
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1787",
                "Z11K2": "radice quadrata razionale con precisione, js"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            "Z31"
        ]
    },
    "Z2K5": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11"
        ]
    }
}