crowlogic / arb4j

arb4j is a Java API for the arbitrary precision ball arithmetic library found at http://arblib.org
Other
1 stars 0 forks source link

ExponentiationNode should have a type() of Fraction if an Integer is attempted to be raised to a negative power #536

Closed crowlogic closed 3 days ago

crowlogic commented 4 days ago
java.lang.AssertionError: -3 is not positive
    at arb4j/arb.Integer.pow(Integer.java:839)
    at y--I*(pFq([1,m,-m],[1⁄2],-((1⁄2)*I)⁄y)*exp(I*(π*m+y))-pFq([1,m,-m],[1⁄2],((1⁄2)*I)⁄y)*exp(I*(2*π*m-y)))*(4*m^2-1)*(-1)^(-m)⁄((4*m^2*y-2*y)*π).evaluate(Unknown Source)
    at arb4j/arb.functions.complex.ComplexFunction.evaluate(ComplexFunction.java:258)
    at arb4j/arb.functions.complex.ComplexFunction.eval(ComplexFunction.java:250)
    at arb4j/arb.expressions.ExpressionTest.testFourierTransformOftype1ChebyshevPolynomials(ExpressionTest.java:54)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    at java.base/java.lang.reflect.Method.invoke(Method.java:580)
    at junit@4.13.2/junit.framework.TestCase.runTest(TestCase.java:177)
    at junit@4.13.2/junit.framework.TestCase.runBare(TestCase.java:142)
    at junit@4.13.2/junit.framework.TestResult$1.protect(TestResult.java:122)
    at junit@4.13.2/junit.framework.TestResult.runProtected(TestResult.java:142)
    at junit@4.13.2/junit.framework.TestResult.run(TestResult.java:125)
    at junit@4.13.2/junit.framework.TestCase.run(TestCase.java:130)
    at junit@4.13.2/junit.framework.TestSuite.runTest(TestSuite.java:241)
    at junit@4.13.2/junit.framework.TestSuite.run(TestSuite.java:236)
    at junit@4.13.2/org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:530)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:758)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:453)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:211)

this will involve handling and implementing Node.isPossiblyNegative()