Testing a 74LS181

Floating inputs, depending on logic family, can cause various problems.

For LS family floating inputs read high IIRC, but 10k pull-ups are advised to prevent noise-pickup. To hold an LS input low you'd normally short to ground (although this increases sensitivity to fast spikes on the ground line)

For CMOS floating inputs can oscillate, draw lots(*) of current.

In general after a couple of gates the indeterminant input signal will settle down to a clean logic state, but
this may happen too late in the chain to prevent it affecting an output that you wouldn't expect to be sensitive
to that input - unlikely but would be very confusing to debug.

The ATmega has a small amount of hysteresis on inputs to reduce the problem, so it isn't typically worried about
for Arduino pins. The old CMOS 4000UBE family (unbuffered CMOS) can be used happily as high gain analog amplifiers
if the inputs are allowed to vary about the crossing-point - floating inputs definitely an issue there.

(*) lots for a CMOS gate isn't much, but affects battery life since it can be 4 or 5 orders of magnitude more than the rest
of the device!