MathGroup Archive 1999

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

Search the Archive

RE: Transformation rules for Floor/Ceiling

  • To: mathgroup at
  • Subject: [mg16989] RE: [mg16953] Transformation rules for Floor/Ceiling
  • From: "Ersek, Ted R" <ErsekTR at>
  • Date: Sat, 10 Apr 1999 02:13:29 -0400
  • Sender: owner-wri-mathgroup at

Mitch Harris wrote:
I am trying to come up with a set of transformation rules (in Mathematica)
to help
simplify formulas involving Floor and Ceiling. There are a number of
identities for these (e.g. Ceiling[a/b] = Floor[a+b-1/b] if b is an
Since anykind of programming is difficult from scratch, I'd like to see some
examples to see if I'm going about it in the right manner.

1) I've done a web search for something like this and I can't find anything
the sort. Have you ever seen something like this (and if so, do you have
pointers as to how to do it)?

2) The Mathematica docs give some ideas (when to use :> rather than ->,
FullForm to make sure you're matching the appropriate patterns). But I'd
really like to see a large example, like for instance the actual
transformation rules that Mathematica uses for polynomials or trig (i.e. the
rules it uses for Simplify, FullSimplify, Reduce, TrigReduce, etc.). Any
ideas? Pointers?


You said:
Ceiling[a/b] = Floor[a+b-1/b] if b is an integer

Where did you ever get that idea?


Well if you are still interested see (ReIm.m) in the standard packages.
Also goto
and look at:
- NonNegativeQ

- Generalization of Abs and Arg for symbolic expressions

- ExactNumber.m  A package to improve the handling of mixtures of exact and
inexact numbers


Anyway I am having a hard time coming up with rules that are always true
without very restrictive conditions.

Ted Ersek

  • Prev by Date: Re: Plot
  • Next by Date: Re: Re: question about entering vectors by the keyboard
  • Previous by thread: Transformation rules for Floor/Ceiling
  • Next by thread: RE: Transformation rules for Floor/Ceiling