0

In programming it is rather the norm than the exception to have functions whose input are different data types. For example a function who produces a substring of a given string would have the following signature in Java:

public static String substring(String s, int n) {..}

Are there examples of such functions in Mathematics and what is their application?

  • any time someone talks about the size of a vector or the number of columns of a matrix they are really calling something like public int length(double[] v) or public int n_cols(double[][] A), if you want to think of it that way :) – Matthew Towers May 10 '23 at 09:40
  • 1
    The definite integral can be considered a function which requires a real-valued function and two real numbers, and produces a real number. – Matthew Leingang May 10 '23 at 09:49
  • The external product in a vector space : $\mathbb{R} \times V \to V$, input $(\lambda, v)$ ; output $\lambda v$ – Jean Marie May 10 '23 at 11:21
  • In the same vein as @Matthew Leingang : the evaluation of a function $f$ at a point $a$ : input $(f,a)$ ; output the real number $f(a)$. – Jean Marie May 10 '23 at 11:25
  • Just as computers encode all those data types in binary, you can encode a lot in an integer if you allow the integer to be large enough. Consider Gödel's incompleteness theorems. – David K May 10 '23 at 12:05

0 Answers0