eigenmath/guess.cpp

25 lines
486 B
C++
Raw Permalink Normal View History

2004-07-22 01:30:24 +02:00
// Guess which symbol to use for derivative, integral, etc.
#include "stdafx.h"
#include "defs.h"
void
guess(void)
{
2008-04-20 00:36:37 +02:00
U *p;
p = pop();
push(p);
if (find(p, symbol(SYMBOL_X)))
2004-07-22 01:30:24 +02:00
push_symbol(SYMBOL_X);
2008-04-20 00:36:37 +02:00
else if (find(p, symbol(SYMBOL_Y)))
2006-04-26 00:48:25 +02:00
push_symbol(SYMBOL_Y);
2008-04-20 00:36:37 +02:00
else if (find(p, symbol(SYMBOL_Z)))
2006-04-26 00:48:25 +02:00
push_symbol(SYMBOL_Z);
2008-04-20 00:36:37 +02:00
else if (find(p, symbol(SYMBOL_T)))
2004-07-22 01:30:24 +02:00
push_symbol(SYMBOL_T);
2008-04-20 00:36:37 +02:00
else if (find(p, symbol(SYMBOL_S)))
push_symbol(SYMBOL_S);
2004-07-22 01:30:24 +02:00
else
push_symbol(SYMBOL_X);
}