Show HN: I made a spreadsheet where formulas also update backwards

https://news.ycombinator.com/rss Hits: 20
Summary

bidicalc A spreadsheet where formulas also update backwards In any normal spreadsheet, when you change values that are the input to some formulas, the outputs are automatically updated:Could it also work the other way? What if you could also change the output, and have the inputs be updated to match the formula?For the past few months I've been obsessed really curious about this idea. But there were so many questions:Would it even be possible at all?Could it work with very complex formulas? With exponents? With advanced math functions like log(), abs(), etc?How would the UX work? In a normal spreadsheet, when you click on a cell that has a formula, you get to change the formula's expression. I would need a way to let the user change either the formula's expression or the cell's numeric value.What should happen if there are multiple possible solutions? Like in the example above, if you set A3 to 100, should the result be 50/50, 20/80, -10000/10100? When there is a infinite number of possible solutions, how to pick one?Could it work with chained formulas? Could I build a long chain of formulas, update the final value and find the matching inputs all the way backwards?Ok, now let's just skip to the good part! Today I'm happy to introduce: bidicalc — a bidirectional calculator User guide Type of cells Variables A simple number entered in a cell is a variable: 1.0. It may be changed by the solver.Constant A number prefixed by a hash # is a constant. It will not be changed by the solver.Text Cells can be in text mode. To input text, wrap in double quotes: "Distance (km)".Formula Formulas can be entered in a cell (the traditional = prefix is optional), for example:A1 + A2 A1 + A2*(A3 - A1)^2 exp(A1) #A1 + H5 * #H6 cos(2*pi())The result of formulas will be automatically updated when an input they depend on changes. This is the usual forward update.The magic of bidicalc is that once a formula has been computed, you can change the result. Bidicalc will walk "upstream" to chan...

First seen: 2025-12-12 23:49

Last seen: 2025-12-13 18:52