Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: question on changing 'type' of numbers

  • To: mathgroup at
  • Subject: [mg69490] Re: question on changing 'type' of numbers
  • From: "Jens-Peer Kuska" <kuska at>
  • Date: Thu, 14 Sep 2006 06:55:18 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <ee8h72$j38$>


a) Mathematica has no types, it has patterns
b) what may Round[], Floor[] and the Ceiling[] 
   do ? Convert a _Real into an _Integer ? in a 
   that give you the full access how the 
fractional term


"Nasser Abbasi" <nma at> schrieb im 
Newsbeitrag news:ee8h72$j38$1 at
|I think of a the Head of expression as its 
| One is supposed to be able to use Apply[f,expr] 
to change head of expression
| to f.
| But Why can't I use this to change the head of a 
Real number to Integer?
| In[122]:=
| Remove["Global`*"]
| x = 0.1
| Head[x]
|           -------------->Real
| Apply[Integer,x]
| Head[x]
|        ------------------->Real. I was expecting 
| x = Integer[x]
| Head[x]
|      ----------------> Now it says Integer
| any idea?
| ofcourse the question as to what should happen 
to the value of the variable
| if for example I change the head of 0.5 from 
Real to Integer is another
| matter. It seems in this case x remained 0.1 but 
only the head said Integer
| x
| ----->Integer[0.1]
| Now sure what the above really means :)
| Nasser

  • Prev by Date: Re: Derivative of a function with multiple variables
  • Next by Date: Re: question on changing 'type' of numbers
  • Previous by thread: Re: question on changing 'type' of numbers
  • Next by thread: Re: question on changing 'type' of numbers