"ComputedHeuristicPercent" (Interpreter Type)
A percentage derived by computation.
Details
- "ComputedHeuristicPercent" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "ComputedHeuristicPercent" requires connectivity to the Wolfram Cloud.
- When the computation yields a unitless number, "ComputedHeuristicPercent" heuristically decides whether to convert it to a percentage or to infer a percent unit.
Restriction Specifications
-
Restricted["ComputedHeuristicPercent",{{choices1,…}}] one among choices Restricted["ComputedHeuristicPercent",unit] convert to unit Restricted["ComputedHeuristicPercent",unit,max] a percentage below Quantity[max,unit] Restricted["ComputedHeuristicPercent",unit,{min,max}] a percentage between Quantity[min,unit] and Quantity[max,unit] Restricted["ComputedHeuristicPercent",unit,{min,max,s}] a percentage between Quantity[min,unit] and Quantity[max,unit] with step s
Interpretation
- "ComputedHeuristicPercent" yields a Quantity.
Examples
Basic Examples (4)
Interpreter["ComputedHeuristicPercent"]["3 percent"]Interpret percentages derived by computation:
Interpreter["ComputedHeuristicPercent"]["Senior population fraction of Florida 2009"]If no unit is provided, convert to a percent when it seems reasonable:
Interpreter["ComputedHeuristicPercent"]["population of France / Europe"]Interpreter["ComputedHeuristicPercent"][".45"]Interpreter["ComputedHeuristicPercent"]["7/5"]Interpreter["ComputedHeuristicPercent"]["156 grams / 1 kg"]In other cases, simply infer a percent unit:
Interpreter["ComputedHeuristicPercent"]["24"]Interpreter["ComputedHeuristicPercent"]["1+2+3+4+5"]Cf. "ComputedPercent", which always infers a percent unit:
Interpreter["ComputedPercent"]["2+3"]And "ComputedPercentFraction", which always converts to a percentage:
Interpreter["ComputedPercentFraction"]["2+3"]Interpreter[Restricted["ComputedHeuristicPercent", Automatic, {1, 15}]][{"Jupiter / Sun radius", "Earth / Sun radius"}]Related Guides
History
Introduced in 2016 (10.4)