Skip to main content

AI Chat Boots and equivalence classes

[Example 1]

Present the prompt for ChatGPT and MS Copilot to solve the following problem:

What is the input domain and the output domain of the following function (PHP language):

function f($x) { $y = $x; } // there is no return statement


[Example 2]

Present the prompt for ChatGPT and MS Copilot to solve the following problem:

What is the input domain and the output domain of the following function (PHP language):

function f(?float $x) : ?string { $y=/* code calculating y here*/ return $y; }

[Example 3]

Present the prompt for ChatGPT and MS Copilot to solve the following problem:

What is the input domain and the output domain of the following function (Java language):

public static double abs(double number);