Zulip Chat Archive
Stream: general
Topic: widget to plot functions
Jakob von Raumer (Feb 27 2024 at 10:01):
Do we have a widget to plot functions, for example Rat -> Rat?
Anand Rao Tadipatri (Feb 27 2024 at 14:06):
This function in ProofWidgets generates plots for functions of type Float -> Float.
Jakob von Raumer (Feb 27 2024 at 14:26):
Do we have function from Rat to and from Float?
Anand Rao Tadipatri (Feb 27 2024 at 15:50):
I couldn't find a function to go from Rat to Float, but it's possible to build one using Nat.toFloat. For the other direction, f.toRatParts seems to give (v, exp) such that f = v * 2^-exp, but this may be too inefficient to use in practice.
Last updated: May 02 2025 at 03:31 UTC