Nice history here of Sinclair Basic, including a bit about the square root bug in ZX81 basic:
“As far as Clive was concerned, it wasn’t a question of what the machine ought to be able to do, but more what could be crammed into the machine given the component budget he’d set his mind on,” said Vickers in an interview on July 23, 1985. “The only firm brief for the '81 was that the '80’s math package must be improved.”
The ROM was almost complete by the end of autumn 1980, but support still had to be added for the ZX Printer. Somewhere between this time and the launch, a bug crept in which caused the square root of 0.25 to be 1.3591409. Nine Tiles quickly fixed the bug, but Sinclair was somewhat tardy in making this version available to people who had already bought the machine.
Also, about Spectrum Basic’s incompleteness:
Those who are interested in what the finished ROM might have looked like should visit Geoff Wearmouth’s website at http://www.wearmouth.demon.co.uk/, where you can download the latest version of his Sea Change ROM, complete with source code. Wearmouth’s version of Sinclair BASIC cunningly includes RS232 and network support in the main ROM, although sadly it is incompatible with the majority of commercial Spectrum software.
And this is impressive, from a different article:
The ZX81 could cope with floating point arithmetic which was achieved by a sub-interpreter, crammed into the ROM, and written very compactly in a FORTH type language. Square roots, for instance, were calculated using only seven bytes — but the code took an awful long time to run! The Spectrum is so slow on floating point arithmetic because it uses these very same routines, that first appeared in the ZX81 ROM.