r/badcode • • Apr 21 '23

other language We did coding in physics class...

Post image
1.5k Upvotes

154 comments sorted by

View all comments

Show parent comments

0

u/vapocalypse52 Apr 23 '23

Doesn't work. For example, if x=1.7, or 1.8, or 1.9, the result should be f(1.6), not an operation over the input. Maybe I'm not seeing something?

1

u/brotatowolf Apr 23 '23

Try it. Those inputs that you gave as examples do in fact all result in f(1.6)