15 lines
465 B
Plaintext
15 lines
465 B
Plaintext
#include <order/interpreter.h>
|
|
|
|
#define ORDER_PP_DEF_8gcd ORDER_PP_FN( \
|
|
8fn(8U, 8V, \
|
|
8if(8isnt_0(8V), 8gcd(8V, 8remainder(8U, 8V)), 8U)))
|
|
|
|
#define ORDER_PP_DEF_8lcm ORDER_PP_FN( \
|
|
8fn(8X, 8Y, \
|
|
8if(8or(8is_0(8X), 8is_0(8Y)), \
|
|
0, \
|
|
8quotient(8times(8X, 8Y), 8gcd(8X, 8Y)))))
|
|
// No support for negative numbers
|
|
|
|
ORDER_PP( 8to_lit(8lcm(12, 18)) ) // 36
|