ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 26 May 2017 07:51:21 -0500Periodic functionhttp://ask.sagemath.org/question/37699/periodic-function/ HI all,
I want to write in sage a `2pi` periodic even function defined by `f(t) = -t + pi`, for `t` in `[0, pi)`. I already checked [Defining a periodic function](https://ask.sagemath.org/question/10539/defining-a-periodic-function/) and [defining periodic functions](https://ask.sagemath.org/question/7799/defining-periodic-functions/) on this plateform, but none of the provided solutions works for me. My main issue is that I need a way to transform any real number `x` into its unique representative in the interval `[-pi, pi)`. For that I used `frac` and `%` but they both raise errors. Could anyone help me out?
Thanks.sokingFri, 26 May 2017 07:51:21 -0500http://ask.sagemath.org/question/37699/