# How to map HoldForm?

I'm trying to compare between Sqrt[3.] and Sqrt[3]. To display the result, I mapped HoldForm to display the expressions on the left hand column (code at end), but it seems like Sqrt[3.] had been evaluated before it was mapped on to. Is there any way to stop that to happen?

Grid[Prepend[{HoldForm[#], Precision[#],
MachineNumberQ[#]} & /@ {Sqrt[3.], Sqrt[3]}, {"Number",
"Precision[]", "MachineNumberQ[]"}],
Frame -> All]

-

Grid[Prepend[{HoldForm[#], Precision[#],
MachineNumberQ[#]} & /@ {Unevaluated@Sqrt[3.],
Sqrt[3]}, {"Number", "Precision[]", "MachineNumberQ[]"}],
Frame -> All]


-
Thank you so much for your help rasher. If you're able to, could you help me explain why HoldForm@Unevaluated@Sqrt[3.] would return Unevaluated[Sqrt[3.]] instead of just Sqrt[3.]? It seems that if a method works directly, it may not work using Map and vice versa. –  seismatica Jun 21 '14 at 10:28
@seismatica: That's because Sqrt[3] evaluated is displayed as Sqrt[3] - its value. Try replacing it with Sqrt[4] with and without the Unevaluated - I'm sure the lightbulb will come on, if not comment back. edit: hang on - I may have misread your comment question... if so, I'll delete this comment reply. - In any case, look at details in the docs for Map - note that it constructs/evaluates the expressions. –  rasher Jun 21 '14 at 10:45
@seismatica: If my comment reply didn't get it for you, I'll give it another shot later if no one else replies - it's nearly 04:00 here, gotta hit the hay... –  rasher Jun 21 '14 at 10:53