Ask Constants Proposes Concise Non-Floats Close to Floats
Why Mathematica Stack Exchange recommends it
Mathematica Stack Exchange answerers point people to it when asked whether Mathematica can propose an exact value from an approximate one.
Recommended by 1 people across 1 different months, 2015 to 2020.
What it is
A 20-minute talk from the Wolfram Technology Conference 2016 in which David Stoutemyer presents Ask Constants, a package that proposes concise exact forms (non-floats) close to a given floating-point number. It covers how the search works and how candidate forms are ranked.
What people said
Recommends Simon · 2017-01 · Mathematica Stack Exchange · on “Can Mathematica propose an exact value based on an approximate one?”
David Stoutemyer and Dale Myers have released a package that does a good job of identifying exact forms from their approximate values. It can be downloaded from AskConstants.org [LINK] David presented the package at the Wolfram Tech Conference 2016 [this video] . You still need to choose which functions and constants you want to include in the search, but it has a good default starting set. It also supplies a nice graph showing the proposed exact forms and how much merit they have. [LINK]
Cites Greg Hurst · 2015-01 · Mathematica Stack Exchange · on “Transform Root objects into Trigonometric expressions”
Disclaimer: This is not a full answer, but perhaps it's a start. From an algebraic stand point this seems like a very hard problem. I attacked it with a more brute force approach. I guess a basis and use LatticeReduce to try to find a Diophantine relation. Note this code only tries to identify roots as the product of integral powers of trig . If it returns an answer you can be assured it's correct. If it returns $Failed , you may not draw any conclusions. RootToTrig[r_, max_:36] := RootToTrig[r, Range[max]] RootToTrig[r_, denomGuesses_List] := Module[{redroot, Nr}, redroot = RootReduce[Sign[r]r]; Nr = N[Log[Abs[r]], 30]; Catch[ If[Im[r] != 0, Throw[ $Failed]]; Do[iRootToTrig[redroot, Nr, Sig
Cites Steffen Jaeschke · 2020-09 · Mathematica Stack Exchange · on “How do I work with Root objects?”
To recover the third solution in Mathematica as is to explain why it is missing in the solution without extra conditions. zeros=Reduce[(3 - Cos[4 x]) (Sin[x] - Cos[x]) == 2 && x >= -2 π && x <= 0, x] /. C[1] -> 0 ( x == -((3 [Pi])/2) || x == -[Pi] ) So the solution implicitly is the substitution for C 1 [LINK] ==0. This has to done by interpreting the periodicity of the trigonometric composition. FunctionPeriod[(3 - Cos[4 x]) (Sin[x] - Cos[x]), x] 2 [Pi] That is too what the constant C 1 [LINK] is for in the solution of Solve and Reduce . So getting the -Pi in the solution was a different interpretation in the question and is not an error. zlist = List @@ zeros[[All, 2]]; This shows each per
Cites Steffen Jaeschke · 2020-09 · Mathematica Stack Exchange · on “Is there a better way to overload Plus?”
Warming up examples, just a guess about the intents of the question: tt = Log[Log[Log[6^5^4^3^2^1]]] // HoldForm; tt /. Log[a_^b_] -> b Log[a] PowerExpand[Log[Log[Log[a^b^c^d^e^f]]]] /. {a -> 6, b -> 5, c -> 4, d -> 3, e -> 2, f -> 1} rules = {Log[x_ y_] :> Log[x] + Log[y], Log[x_^k_] :> k Log[x]}; Defer@Log[Log[Log[6^5^4^3^2^1]]] //. rules Block[{Power, Log}, Log[Log[Log[6^5^4^3^2^1]]] // PowerExpand] Log[Log[Log[6^5^4^3^2^1]]] // Hold // PowerExpand // ReleaseHold [LINK] and Log[262144 Log[5] + Log[Log[2] + Log[3]]] These are unstable and may not always give good results or even results in others than overflows. `Condition [LINK] may protect from these. Another nice problem in Mathematica