Question: problem5 big PowerNegate The BigDecimal class represents decimal numbers with an arbitrary number of digits (the double and float types cannot express very high precision)
problem5 big PowerNegate The BigDecimal class represents decimal numbers with an arbitrary number of digits (the double and float types cannot express very high precision) Given a BigDecimal object and an integer, calculate a BigDecimal that is equal to the original BigDecimal raised to the power of the given integer. Then negate that number and return the result See the BigDecimal class in the Java API docs. Examples: problems_bigpower Negate(new BigDecimal(3.1), 2) // returns -9.610000000000000550670620214077651938730359583164929117285652827862296732064351090230 problem_bigPower Negate(new BigDecimal(-0.1993), 3) // returns 0.00791629365700000058739338593127855890456016802133118183806934303472382602309 problem_bigPower Negate(new BigDecimal(99.3), B) // returna -9453529591320953. 729571787351459193399541015921376870526116995409826680197624291297748
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
