Large and infinite sums evaluated numerically

I am interested to learn when and how Mathematica is able to evaluate large/infinite sums numerically in reasonable time. I have found that it can evaluate $ $ \sum_{l=1}^{\infty}e^{il/2}H_{0}^{(1)}(l) $ $ or any finite truncation of this in a fraction of a second:

NSum[Exp[I 0.5 l] HankelH1[0, l], {l, 1, 10000000000}] NSum[Exp[I 0.5 l] HankelH1[0, l], {l, 1, 100000000000}] NSum[Exp[I 0.5 l] HankelH1[0, l], {l, 1, 1000000000000}] NSum[Exp[I 0.5 l] HankelH1[0, l], {l, 1, Infinity}] 

How is it able to do this? I’m not aware of any exact formula for this sum (if there is one please let me know!), and the sum doesn’t even converge very rapidly, with the terms dying off as $ O(1/l^{1/2})$ in absolute value.

Thanks in advance for any help.

Where does a creature – flying low over a large body of water – descend when subject to the Earthbind spell?

In looking at the question Can the Erupting Earth spell be cast somewhere that isn’t on “ground”? other examples of spells involving the "ground" could be useful. Or not. Which lead to the question, where does a creature – flying low over a large body of water – descend when subject to the Earthbind spell?


According to the description of Earthbind:

An airborne creature affected by this spell safely descends at 60 feet per round until it reaches the ground or the spell ends. (XGtE pg 155)


Assuming the creature began its turn 60 feet above the water and failed its Strength saving throw, would the spell end:

a) when the creature reaches the water’s surface after 1 round (in other words, is the surface of the water "ground"?), or

b) would the creature continue to descend for the remaining 9 rounds for as much as 540 feet to the earthen bottom of the body of water (see note below), or

c) would the spell fail altogether, or

d) would the creature be forced essentially sideways for the duration of the spell, towards the nearest point of land, or

e) other?


Note re being forced towards bottom of large body of water:

Given a creature with 10 Constitution, 30 ft movement, and no innate swimming speed, its movement in the ocean would be 30 ft using both its Movement and Action to "Dash" (or 20 ft in difficult terrain).

540 ft of total movement would take 18 rounds (27 rounds in difficult terrain) and the creature – assuming it can’t breathe underwater or teleport in some fashion – would be unable to hold its breath after 10 rounds and would drop to 0 hit points after the next round.


’cause if the surface of the ocean is ground, guess what might . . . erupt?

Chinese remainder theorem large modulo

I have the following modulo congruences:

x ≡ 0 (mod 2) x ≡ 2 (mod 5) x ≡ 21 (mod 41) x ≡ 16793129237622992703097532489897447320171386 (mod 648250901^5) 

I know, usually these types of problem can be solved using the ChineseRemainderTheorem, i.e:

ChineseRemainder[{0, 2}, {2, 5}, {21, 41}, {16793129237622992703097532489897447320171386, 648250901^5}] 

But this does not work, so I wonder how to solve this in Mathematica?

The answer should be: $ x = 45349414319770996556255505100816573064904553782$

Any ideas?

Does spike growth inflict cumulative damage on large and bigger creatures?

Spike growth:

The ground in a 20-foot radius centered on a point within range twists and sprouts hard spikes and thorns. The area becomes difficult terrain for the duration. When a creature moves into or within the area, it takes 2d4 piercing damage for every 5 feet it travels. The transformation of the ground is camouflaged to look natural. Any creature that can’t see the area at the time the spell is cast must make a Wisdom (Perception) check against your spell save DC to recognize the terrain as hazardous before entering it.

"That day, the druid cast spike growth where a gargantuan, half-burrowed Sandworm stood… and for the next half hour, everybody stopped playing and started frantically browsing through the manuals to figure out what to do."

So, the question does size matter…?

I take for granted that you can choose as the epicenter of the spell the point where the creature touches the ground: it won’t influence the space where the body of the creature is, nor anything below, but the surrounding terrain on the ground level should be influenced (although you don’t really see such point, the spell doesn’t require you too, contrary to the usual routine). So, the token of this sizeable creature occupies a 16 (4×4) squares space on the grid (12 hexagons if you’re into that). At the start of its turn, it’s gonna find himself in the middle of a semi-hidden spike field. Since the spell only hurts whoever moves into or within the area, I infer that creatures who find themselves already in it and decide not to move won’t get hurt, all the more if they’re half-burrowed. Now, if the creature notices the danger (and it should since it was there) but still decides to move above the terrain (although I guess he could return underground where half his body lies without repercussions), how much does he get hurt? The spell mentions a damage x movement ratio, and with smaller creatures it’s no problem. But what about bigger monsters? Is this 2nd level spell a colossus bane, which indirectly does x4 damage to large monsters, x9 to huge ones and x16 to gargantuan ones per square (=5 feet)?

RAW, I’d rule against it: bigger creatures aren’t affected multiple times by effects that target more than one of their squares (think fireball: no matter the size, if the spell hits just a square or the whole circumference of a token, the damage only hits once). That said, seems to me like this huge AoE spell should indeed scale with the size of its victims as more spikes pierce through their flesh. Also, it wouldn’t be the first time that low level spells were hugely effective against specific creatures (heat metal against full-plated enemies comes to mind).

What do you think?

How large is Waterdeep?

I’m going to be running Waterdeep: Dragon Heist for my group soon. As part of this I would like to work out how long it would take characters to travel around the city on foot, both from top to bottom, and from side to side. In order to do this I need to figure out the scale of the city.

There is a wonderful map provided with the adventure, however it has no scale attached to it, or at least none I can find!

Is there official material which details the size of Waterdeep in geographic terms?

What happens when a large creature stops squeezing in a space that they had to use squeeze to enter?

This is a follow up question relating to What are the advantages and disadvantages of allowing a player to play a large creature?

So far, everything for the player playing the large Minotaur has been balanced. If anything, not being able to move between enemies that had a one square gap between them has shown that the character is actually weaker than a medium sized Defender.

So here’s what happened:

The party’s rogue ran into a room by himself, jump on a 10×25 foot table, and hit an enemy that was eating. Enemies that had been hiding rushed him from all corners (The players had been very noisy in the previous room). He was surrounded and in one enemy round he was unconscious.

The Minotaur fighter decided to Squeeze to move into the same square as the prone rogue.

After fighting (at a -5 penalty to hit because of the Squeeze) he decided to stop squeezing and push the enemies off the table.

Fortunately, he hadn’t only decided to stop using Squeeze, but he had also decided to Jump and smash the table with malicious intent.

We ruled that he broke the table in half and sent one of the enemies flying into the wall after they failed their acrobatics check. This gave the Minotaur space to land at full size to continue fighting the enemies.

Had he not had a table to break, how would a large creature that is being flanked by four enemies that stops using Squeeze work?

We talked about it after, and because he’s 10 feet tall and weighs 850 pounds we decided that if he did it again they would all get an attack of opportunity on a successful acrobatics check or be moved one square.

How should this actually go?