[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

floating point in M4

From: Amaury Ampe
Subject: floating point in M4
Date: Mon, 03 May 2010 16:30:05 +0200
User-agent: Internet Messaging Program (IMP) H3 (4.1.6)

I've been asked to change the program of a robot in a way that will allow users to change the values of its controllor in an easy way. Those values have to be floating point numbers. The current program uses M4 to "transport" values from the memory to the processor. The processor makes al its calculations with 64bit floating point numbers. If I understood correctly M4 is only capable of doing Integer arithmetic. Since I won't be doing any arithmetic with M4 I'm wondering if I can use it to "transport" floating point numbers. Or will it just convert them into strings?

The current program looks like this:


# operation_(operationName, arg1, arg2, ..., argn)
# Applies the operation name given by the first argument to the
# remaining arguments.
# For example, operation_(`f', 1, 2) expands to f(1, 2).
define(`operation_', `$1(shift($@))')

with 9 the number I want to be able to change to any floating point number

My other option is to address the processors memory directly but I'd rather not go there.

Does anyone has any ideas on how to solve this?

Kind greetings,
Amaury Ampe

This message was sent using IMP, the Internet Messaging Program.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]