Skip to content

Instantly share code, notes, and snippets.

@apocalyptech
Created November 3, 2024 21:38
Show Gist options
  • Save apocalyptech/ed6072f875d2ef8f4d067f752ede55ea to your computer and use it in GitHub Desktop.
Save apocalyptech/ed6072f875d2ef8f4d067f752ede55ea to your computer and use it in GitHub Desktop.
Making 405.0 plastic and 405.0 rubber
720.0 fuel into the recycling loop
90.0 seed rubber
Iter 0
------
405.0 plastic means we need 202.5 rubber.
We're getting 90.0 from seed already
-> Recycled Plastic Fuel Consumption: 202.5
-> Recycled Rubber Fuel Consumption: 0
517.5 rubber means we need 258.75 plastic.
-> Recycled Plastic Fuel Consumption: 202.5
-> Recycled Rubber Fuel Consumption: 258.75
Iter 1
------
258.75 plastic means we need 129.375 rubber.
-> Recycled Plastic Fuel Consumption: 331.875
-> Recycled Rubber Fuel Consumption: 258.75
129.375 rubber means we need 64.6875 plastic.
-> Recycled Plastic Fuel Consumption: 331.875
-> Recycled Rubber Fuel Consumption: 323.4375
Iter 2
------
64.6875 plastic means we need 32.3438 rubber.
-> Recycled Plastic Fuel Consumption: 364.2188
-> Recycled Rubber Fuel Consumption: 323.4375
32.3438 rubber means we need 16.1719 plastic.
-> Recycled Plastic Fuel Consumption: 364.2188
-> Recycled Rubber Fuel Consumption: 339.6094
Iter 3
------
16.1719 plastic means we need 8.0859 rubber.
-> Recycled Plastic Fuel Consumption: 372.3047
-> Recycled Rubber Fuel Consumption: 339.6094
8.0859 rubber means we need 4.043 plastic.
-> Recycled Plastic Fuel Consumption: 372.3047
-> Recycled Rubber Fuel Consumption: 343.6523
Iter 4
------
4.043 plastic means we need 2.0215 rubber.
-> Recycled Plastic Fuel Consumption: 374.3262
-> Recycled Rubber Fuel Consumption: 343.6523
2.0215 rubber means we need 1.0107 plastic.
-> Recycled Plastic Fuel Consumption: 374.3262
-> Recycled Rubber Fuel Consumption: 344.6631
Iter 5
------
1.0107 plastic means we need 0.5054 rubber.
-> Recycled Plastic Fuel Consumption: 374.8315
-> Recycled Rubber Fuel Consumption: 344.6631
0.5054 rubber means we need 0.2527 plastic.
-> Recycled Plastic Fuel Consumption: 374.8315
-> Recycled Rubber Fuel Consumption: 344.9158
Iter 6
------
0.2527 plastic means we need 0.1263 rubber.
-> Recycled Plastic Fuel Consumption: 374.9579
-> Recycled Rubber Fuel Consumption: 344.9158
0.1263 rubber means we need 0.0632 plastic.
-> Recycled Plastic Fuel Consumption: 374.9579
-> Recycled Rubber Fuel Consumption: 344.9789
Iter 7
------
0.0632 plastic means we need 0.0316 rubber.
-> Recycled Plastic Fuel Consumption: 374.9895
-> Recycled Rubber Fuel Consumption: 344.9789
0.0316 rubber means we need 0.0158 plastic.
-> Recycled Plastic Fuel Consumption: 374.9895
-> Recycled Rubber Fuel Consumption: 344.9947
Iter 8
------
0.0158 plastic means we need 0.0079 rubber.
-> Recycled Plastic Fuel Consumption: 374.9974
-> Recycled Rubber Fuel Consumption: 344.9947
0.0079 rubber means we need 0.0039 plastic.
-> Recycled Plastic Fuel Consumption: 374.9974
-> Recycled Rubber Fuel Consumption: 344.9987
Iter 9
------
0.0039 plastic means we need 0.002 rubber.
-> Recycled Plastic Fuel Consumption: 374.9993
-> Recycled Rubber Fuel Consumption: 344.9987
0.002 rubber means we need 0.001 plastic.
-> Recycled Plastic Fuel Consumption: 374.9993
-> Recycled Rubber Fuel Consumption: 344.9997
Iter 10
-------
0.001 plastic means we need 0.0005 rubber.
-> Recycled Plastic Fuel Consumption: 374.9998
-> Recycled Rubber Fuel Consumption: 344.9997
0.0005 rubber means we need 0.0002 plastic.
-> Recycled Plastic Fuel Consumption: 374.9998
-> Recycled Rubber Fuel Consumption: 344.9999
Iter 11
-------
0.0002 plastic means we need 0.0001 rubber.
-> Recycled Plastic Fuel Consumption: 375.0
-> Recycled Rubber Fuel Consumption: 344.9999
0.0001 rubber means we need 0.0001 plastic.
-> Recycled Plastic Fuel Consumption: 375.0
-> Recycled Rubber Fuel Consumption: 345.0
Iter 12
-------
0.0001 plastic means we need 0.0 rubber.
-> Recycled Plastic Fuel Consumption: 375.0
-> Recycled Rubber Fuel Consumption: 345.0
0.0 rubber means we need 0.0 plastic.
-> Recycled Plastic Fuel Consumption: 375.0
-> Recycled Rubber Fuel Consumption: 345.0
Close enough to exact, exiting!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment