UNPKG

@thi.ng/pointfree

Version:

Pointfree functional composition / Forth style stack execution engine

146 lines 3.11 kB
import type { StackContext } from "./api.js"; /** * Stack effect: `( x y -- x+y )` * * @param ctx - */ export declare const add: (ctx: StackContext) => StackContext; /** * Stack effect: `( x y -- x*y )` * * @param ctx - */ export declare const mul: (ctx: StackContext) => StackContext; /** * Stack effect: `( x y -- x-y )` * * @param ctx - */ export declare const sub: (ctx: StackContext) => StackContext; /** * Stack effect: `( x y -- x/y )` * * @param ctx - */ export declare const div: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- 1/x )` * * @param ctx - */ export declare const oneover: import("./api.js").StackFn; /** * Stack effect: `( x y -- x%y )` * * @param ctx - */ export declare const mod: (ctx: StackContext) => StackContext; /** * Stack effect: `( x y -- min(x,y) )` * * @param ctx - */ export declare const min: (ctx: StackContext) => StackContext; /** * Stack effect: `( x y -- max(x,y) )` * * @param ctx - */ export declare const max: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- -x )` * * @param ctx - */ export declare const neg: (ctx: StackContext) => StackContext; /** * Stack effect: `( x y -- pow(x,y) )` * * @param ctx - */ export declare const pow: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- sqrt(x) )` * * @param ctx - */ export declare const sqrt: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- exp(x) )` * * @param ctx - */ export declare const exp: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- log(x) )` * * @param ctx - */ export declare const log: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- sin(x) )` * * @param ctx - */ export declare const sin: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- cos(x) )` * * @param ctx - */ export declare const cos: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- tan(x) )` * * @param ctx - */ export declare const tan: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- tanh(x) )` * * @param ctx - */ export declare const tanh: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- floor(x) )` * * @param ctx - */ export declare const floor: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- ceil(x) )` * * @param ctx - */ export declare const ceil: (ctx: StackContext) => StackContext; /** * Stack effect: `( x y -- sqrt(x*x+y*y) )` * * @param ctx - */ export declare const hypot: (ctx: StackContext) => StackContext; /** * Stack effect: `( x y -- atan2(y,x) )` * * @param ctx - */ export declare const atan2: (ctx: StackContext) => StackContext; /** * Stack effect: `( -- Math.random() )` * * @param ctx - */ export declare const rand: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- bool )` * * @param ctx - */ export declare const even: (ctx: StackContext) => StackContext; /** * Stack effect: `( x -- bool )` * * @param ctx - */ export declare const odd: (ctx: StackContext) => StackContext; //# sourceMappingURL=math.d.ts.map