Ask Your Question
1

What does r after a number mean

asked 2025-01-17 20:09:37 +0100

Luis gravatar image

I've noticed that Sage accepts the following coercion: 1r or 2.4r which turn the value into a float.

What is this "r" suffix? I tried searching for it but did not get any good results.

Are there any other of these suffixes? Like a c for complex numbers or a q for rational.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2025-01-17 20:32:03 +0100

Max Alekseyev gravatar image

"r" or "R" suffix is a feature of Sage's preparser used to indicate raw literals protected from preparsing. See https://doc.sagemath.org/html/en/refe... for details.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2025-01-17 20:09:37 +0100

Seen: 59 times

Last updated: Jan 17