Floorist is quite right. Formaldehyde has not been used in carpets for about 30 years. It is yet another false Urban Myth.
Formaldehyde is used in solid bamboo wood floors. Stock made after about 2007 (I think) is subject to a convention limiting the amount of formaldehyde that the final product may emit
https://en.wikipedia.org/wiki/Bamboo_floor
I am no expert but we have solid bamboo flooring in about half of our 1st floor. I am a chronic asthmatic (it is very well controlled however) and I have noticed no change in my breathing since we had this installed in 2011. I realize that a sample of one (me) is useless (except to me...). However I pass on my own experience for what it's worth.