# How to define range for Manipulate using exponents

I have a function:

f[x_,y_] = x*y // ScientificForm;
Manipulate[f[x,y], {x, 10^-1, 10^-10}, {y, 0.01, 1, 0.01}]


When I try to execute it - it does work. However I want my x to increment in following manner: for x, 10^-1, 10^-2, 10^-3, ..., 10^-10 and for y, 0.01, 0.02, ..., 0.1, ..., 0.11, ..., till eventually 1;

I can't get my head around this. Could somebody please share any links on how to actually build interface in Mathematica. That would be very much appreciated

• You could use Manipulate[f[10^x, y], {x, -10, -1}, {y, 0.01, 1, 0.01}] with the f you already have. Does that do what you want?
– acl
Commented Jul 18, 2014 at 22:42

Using the logManipulator from my answer to Logarithmic slider, you can also achieve your objective via

Manipulate[
f[x, y],
{x, 10.^-10, 10^-1, 10, logManipulator[##] &},
{y, 0.01, 1, 0.01}]


Code for logManipulator:

ClearAll[logManipulator];
With[{smallerRule = {Large -> Medium, Medium -> Small, Small -> Tiny}},
logManipulator[Dynamic[x_], range_: {1, 10},
OptionsPattern[Manipulator]] := With[{
logrange = Log10[range],
imagesize = OptionValue[ImageSize] /. Automatic -> Medium,
inputfieldsize =
OptionValue[ImageSize] /. Automatic -> Medium /. smallerRule,
enabled = OptionValue[Enabled],
continuousaction = OptionValue[ContinuousAction],
appearance =
First[Cases[OptionValue[Appearance],
Tiny | Small | Medium | Large] /. {} -> {Automatic}],
labeled = ! FreeQ[OptionValue[Appearance], "Labeled"] || !
FreeQ[OptionValue[AppearanceElements], "InlineInputField"],
opener =
OptionValue[AppearanceElements] /. {Automatic -> True,
All -> True, None -> False,
l_List :> (Cases[l, Except["InlineInputField"]] =!= {})},
inputfield =
MatchQ[OptionValue[AppearanceElements], Automatic | All] ||
! FreeQ[OptionValue[AppearanceElements], "InputField"],
appearanceelements =
OptionValue[AppearanceElements] /. {Automatic -> All, None -> {},
l_List :> Cases[l, Except["InlineInputField" | "InputField"]]},
autoaction = OptionValue[AutoAction],
exclusions = OptionValue[Exclusions]},
ReleaseHold@MakeExpression[
PaneBox[
DynamicModuleBox[{
Typesetopen$$= ! FreeQ[OptionValue[Appearance], "Open"], Typesetpaused$$ = OptionValue[PausedTime],
Typesetrate$$= OptionValue[AnimationRate], Typesetdir$$ = OptionValue[AnimationDirection]},
StyleBox[
DynamicBox[
FEPrivateFrontEndResource["FEExpressions", "Manipulator04"][
Dynamic[x],
Dynamic[Log10[x], (x = 10^#) & ],
logrange,
imagesize,
inputfieldsize,
enabled,
continuousaction,
appearance,
labeled,
opener,
inputfield,
appearanceelements ,
autoaction,
exclusions,
Dynamic[Typesetopen$$], Dynamic[Typesetpaused$$],
Dynamic[Typesetrate$$], Dynamic[Typesetdir$$]]],
DynamicUpdating -> True],
DynamicModuleValues :> {}],
BaselinePosition -> (OptionValue[BaselinePosition] /. Automatic -> Baseline),
ImageMargins -> OptionValue[ImageMargins]],
StandardForm]]
]

f[x_, y_] = x*y;

Manipulate[
f[x, y] // ScientificForm,
{{x, 10.^-6}, 10.^Range[-1, -10, -1]},
{{y, .5}, 0.01, 1, 0.01, Appearance -> "Labeled"}]
`