pure-data/src/d_math.c

/* Copyright (c) 1997-2001 Miller Puckette and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */

/*  mathematical functions and other transfer functions, including tilde
    versions of stuff from x_acoustics.c.
*/

#include "m_pd.h"
#include <math.h>
#include <limits.h>
#define LOGTEN
#define SIGTOTAL(s)

/* ------------------------- clip~ -------------------------- */
static t_class *clip_class;

t_clip;

static void *clip_new(t_floatarg lo, t_floatarg hi)
{}

static t_int *clip_perform(t_int *w)
{}

static void clip_dsp(t_clip *x, t_signal **sp)
{}

static void clip_setup(void)
{}

/* sigrsqrt - reciprocal square root good to 8 mantissa bits  */

#define DUMTAB1SIZE
#define DUMTAB2SIZE

/* There could be a thread race condition here but it will only cause extra]
memory allocation. */
static float *rsqrt_exptab, *rsqrt_mantissatab;

static void init_rsqrt(void)
{}

    /* these are used in externs like "bonk" */

t_float q8_rsqrt(t_float f0)
{}

t_float q8_sqrt(t_float f0)
{}

t_float qsqrt(t_float f) {}
t_float qrsqrt(t_float f) {}

t_sigrsqrt;

static t_class *sigrsqrt_class;

static void *sigrsqrt_new(void)
{}

static t_int *sigrsqrt_perform_quick(t_int *w)
{}

static t_int *sigrsqrt_perform(t_int *w)
{}

static void sigrsqrt_dsp(t_sigrsqrt *x, t_signal **sp)
{}

void sigrsqrt_setup(void)
{}


/* sigsqrt -  square root good to 8 mantissa bits  */

t_sigsqrt;

static t_class *sigsqrt_class;

static void *sigsqrt_new(void)
{}

t_int *sigsqrt_perform_quick(t_int *w)
{}

t_int *sigsqrt_perform(t_int *w)    /* not static; also used in d_fft.c */
{}

static void sigsqrt_dsp(t_sigsqrt *x, t_signal **sp)
{}

void sigsqrt_setup(void)
{}

/* ------------------------------ wrap~ -------------------------- */

t_sigwrap;

t_class *sigwrap_class;

static void *sigwrap_new(void)
{}

static t_int *sigwrap_perform(t_int *w)
{}

     /* old buggy version that sometimes output 1 instead of 0 */
static t_int *sigwrap_old_perform(t_int *w)
{}

static void sigwrap_dsp(t_sigwrap *x, t_signal **sp)
{}

void sigwrap_setup(void)
{}

/* ------------------------------ mtof~ -------------------------- */

t_mtof_tilde;

t_class *mtof_tilde_class;

static void *mtof_tilde_new(void)
{}

static t_int *mtof_tilde_perform(t_int *w)
{}

static void mtof_tilde_dsp(t_mtof_tilde *x, t_signal **sp)
{}

void mtof_tilde_setup(void)
{}

/* ------------------------------ ftom~ -------------------------- */

t_ftom_tilde;

t_class *ftom_tilde_class;

static void *ftom_tilde_new(void)
{}

static t_int *ftom_tilde_perform(t_int *w)
{}

static void ftom_tilde_dsp(t_ftom_tilde *x, t_signal **sp)
{}

void ftom_tilde_setup(void)
{}

/* ------------------------------ dbtorms~ -------------------------- */

t_dbtorms_tilde;

t_class *dbtorms_tilde_class;

static void *dbtorms_tilde_new(void)
{}

static t_int *dbtorms_tilde_perform(t_int *w)
{}

static void dbtorms_tilde_dsp(t_dbtorms_tilde *x, t_signal **sp)
{}

void dbtorms_tilde_setup(void)
{}

/* ------------------------------ rmstodb~ -------------------------- */

t_rmstodb_tilde;

t_class *rmstodb_tilde_class;

static void *rmstodb_tilde_new(void)
{}

static t_int *rmstodb_tilde_perform(t_int *w)
{}

static void rmstodb_tilde_dsp(t_rmstodb_tilde *x, t_signal **sp)
{}

void rmstodb_tilde_setup(void)
{}

/* ------------------------------ dbtopow~ -------------------------- */

t_dbtopow_tilde;

t_class *dbtopow_tilde_class;

static void *dbtopow_tilde_new(void)
{}

static t_int *dbtopow_tilde_perform(t_int *w)
{}

static void dbtopow_tilde_dsp(t_dbtopow_tilde *x, t_signal **sp)
{}

void dbtopow_tilde_setup(void)
{}

/* ------------------------------ powtodb~ -------------------------- */

t_powtodb_tilde;

t_class *powtodb_tilde_class;

static void *powtodb_tilde_new(void)
{}

static t_int *powtodb_tilde_perform(t_int *w)
{}

static void powtodb_tilde_dsp(t_powtodb_tilde *x, t_signal **sp)
{}

void powtodb_tilde_setup(void)
{}

/* ----------------------------- exp~ ----------------------------- */
static t_class *exp_tilde_class;

t_exp_tilde;

static void *exp_tilde_new(void)
{}

t_int *exp_tilde_perform(t_int *w)
{}

static void exp_tilde_dsp(t_exp_tilde *x, t_signal **sp)
{}

static void exp_tilde_setup(void)
{}

/* ----------------------------- abs~ ----------------------------- */
static t_class *abs_tilde_class;

t_abs_tilde;

static void *abs_tilde_new(void)
{}

t_int *abs_tilde_perform(t_int *w)
{}

static void abs_tilde_dsp(t_abs_tilde *x, t_signal **sp)
{}

static void abs_tilde_setup(void)
{}

/* ------------------------ global setup routine ------------------------- */

void d_math_setup(void)
{}