Fiat means "by decree" or "by authority". Fiat money is money that is decreed into existence by some authority, that is, the government. This is done through legal tender laws.
Bitcoin is not created by the enactment of some law by some authority. Fiat does not mean "by consensus", or "by mathematics". Saying code is decree, and therefor fiat, is sloppy thinking.
Bitcoin may have much in common with fiat, but that does not mean that it is fiat. It is, by definition, not fiat.
What gives Bitcoin value is not government decree, but its utility [1]. And that is somewhat paradoxical, because the more people hoard it the less utility it has. And the more its used to buy and sell goods, the more utility it has, and the more value it has.