2
$\begingroup$

The statement Numerator[6/8] evaluates to 3. Numerator[Hold[6/8] does not work. What function NewNumerator[6/8] evaluates to 6?

$\endgroup$
  • 5
    $\begingroup$ Numerator[Unevaluated[6/8]] $\endgroup$ – ciao May 19 '15 at 18:20
  • 1
    $\begingroup$ Why not use Extract[] on the held fraction? $\endgroup$ – J. M.'s technical difficulties May 19 '15 at 18:21
  • $\begingroup$ num[frac_] := frac[[1, 1]] den[frac_] := 1/frac[[1, 2]] num@HoldForm[6/8] den@HoldForm[6/8] $\endgroup$ – martin May 19 '15 at 20:52

Browse other questions tagged or ask your own question.