EXP(π√163)が整数にとても近くなるという事について、ちょっとだけ詳しく本に載っていたので試し計算。
ソースコード
PROGRAM test IMPLICIT NONE INTEGER, PARAMETER :: kq = SELECTED_REAL_KIND(25) REAL(kq), PARAMETER :: pi = 4.0_kq * ATAN(1.0_kq) REAL(kq), PARAMETER :: funny(3) = [43.0_kq, 67.0_kq, 163.0_kq] REAL(kq) :: pseud(3) pseud = EXP( pi * SQRT( funny ) ) PRINT *, ' d = ' PRINT *, funny PRINT * PRINT *, ' X = EXP( pi * SQRT( d ) ) ' PRINT *, pseud PRINT * PRINT *, ' Y = X - 744 + 196884 / X - 21493760 / X**2 ' PRINT *, pseudint( pseud ) PRINT * PRINT *, ' Y ** 1/3 ' PRINT '(F10.0)', pseudint( pseud ) ** (1.0_kq / 3.0_kq) STOP CONTAINS REAL(kq) ELEMENTAL FUNCTION pseudint(x) REAL(kq), INTENT(IN) :: x pseudint = x - 744.0_kq + 196884.0_kq / x - 21493760.0_kq / (x * x) ! +... RETURN END FUNCTION pseudint END PROGRAM test