# Problem with precision of fraction numbers

I have tried to take a series of harmonic numbers using Mathematica and its precision but there has been an issue.

So far when I computed the sums at a whole numbers using a precision of 100 digits I get the actual answer:

1 + Sum[(-1)^n*HarmonicNumber[7100, -2*(2*n + 1)]/(2*n + 1)!, {n, 0, 1000}]
(* Out: -1.868999598223701053846038076059845120154764132531047620125078549115461178796083  *)


However when I take a fractional value of 1.2 with a precision of 100 I get...

1 + Sum[(-1)^n*HarmonicNumber[1.2100, -2*(2*n + 1)]/(2*n + 1)!, {n, 0, 1000}]
(* Out: 0-185.11918423420613 *)


Even if I take the precision up to 10000, I get:

1 + Sum[(-1)^n*HarmonicNumber[1.210000, -2*(2*n + 1)]/(2*n + 1)!, {n, 0, 1000}]
(* Out: -4.56046017401129109343772345210743626064228....×10^156*)


Why is this the case? Could be that I have used mathemtica beta online? Is there a way of getting the actual answer without taking the precision to millions of digits?

q = Total[(-1)^Range[1000] Table[HarmonicNumber[n], {n, 1000}]]

• @Arbuja - Use Rationalize – Bob Hanlon Sep 19 '15 at 15:50
• I used q=Total[(-1)^Range[1000] Table[HarmonicNumber[7,-2*(2*n+1)], {n, 1000}]] and got 0-9339.452026231627 – Arbuja Sep 20 '15 at 12:30
• I'm not sure what is going on. When I do q=Total[(-1)^Range[1000] Table[HarmonicNumber[7,-2*(2*n+1)], {n, 1000}]]//N` I get a very large number: 1.208301442749174*10^3382 . – bill s Sep 20 '15 at 14:03