The sage code doesn't use gp for this. The error you're encountering happens in
sage.functions.other._eval_floor_ceil
and it happens because the system tries to evaluate the expression using interval arithmetic. It iteratively increases the precision until it find an interval that doesn't straddle an integer or it gives up after a set number of trials. You're hitting that second condition. You don't make it easier by multiplying by 10^4. In fact, you make it harder: you now need more digits to get the interval to not include an integer.
Without more information, this code basically has to give up after a fixed number of tries: it could be evaluating an expression that actually does evaluate to 1. In that case, no amount of increased precision will result in an interval that doesn't contain an integer. It's a well-known problem in numerical approximation: discontinuous functions are basically not computable in that model.
so does sage if you tell it to use the same approach gp uses:
sage: tanh(91).n(30).floor()
1
sage: tanh(91).n(300).floor()
0