Try it online!
Finally, a challenge simple enough that I could attempt some brainfuckery.
Credits to https://esolangs.org/wiki/Brainfuck_algorithms for the squaring algorithm and the comparison algorithm ideas, Fatih Erikli's brainfuck visualizer, and to El Brainfuck for quick runs.
(Also to user202729 for noticing an unnecessary space in the code and for a link with a bash I/O wrapper.)
Calculates \$ i^2 \$ for each \$ i \$ starting from 1, and checks if \$ i^2 < n \$. Returns the last \$ i \$ for which that's true.
Input and output are usually ASCII characters representing numbers. For eg., in the TIO link, input Now links to a version that takes and returns numeric I/O directly. Assumes a wrapping implementation (for the comparison algorithm).
d (ASCII 100) returns character tab
\t (ASCII 9).
, n input
> i = 0
> exitflag (is isqr lt n)
+[- while exitflag not 0
+ increment i
[>+>+>+<<<-] make 3 copies of i (destructively)
>[-<+>] use one of them (temp0) to restore i
Squaring by multiplying icopy1 with icopy2:
>[ while icopy1 not 0
>[>+<<<+>>-] copy icopy2 to temp3 and add it to isqr
>[<+>-] restore icopy2 from temp3
<<- decrement icopy1
>[-] reset temp2 (icopy2) to 0
Comparing n and isqr:
<<<<[>>>+>+<<<<-] copy n to ncopy and temp2
>>>>[<<<<+>>>>-] restore n from temp2
<[ while ncopy
>+ increment temp2 as flag
<<[>>[-]>+<<<-] if isqr gt 0 reset temp2 (destroys isqr & copies to temp3)
>>>[<<<+>>>-] restore isqr from temp3
<[>>+<<-] set exitflag to 1 if temp2 was not reset
<<->- decrement isqr & decrement ncopy
<[-] reset isqr (would have been set to negative of n minus isqr)
>>>> check the flag and exit if isqr gt n
<<<<<-. decrement i by 1 and output