# Mayelana nokwaziswa kwemisebenzi enamagatsha0820

Abakaki abasontekile bayasetshenziswa ekuchazweni kwezincazelo zomsebenzi ngokuhlukaniswa kwamacala. Silandela umbuzo olula wokuthi ngabe lokhu kumelwa nakho kungasuswa futhi umsebenzi ungancishiselwa kwisaziso esenza ngaphandle kwaso. Isibonelo, umsebenzi

$$f: \mathbb{R} \to \mathbb{R}, f(x) = \left\{\begin{matrix} 42, & \text{falls } x = 0 \\ x, & \text{sonst} \end{matrix}\right.$$

ngosizo lwemisebenzi eyisisekelo yezibalo kusetshenziswa igama lomugqa owodwa?

Lokho akunakwenzeka futhi sikufakazisa ngosizo lokuqhubeka.

Sibheka ukulandelana $$(x_n)$$ ne- $$x_n = \frac{1}{n}$$ . Kulokhu kulandelana $$\lim_{ n \to \infty } x_n = \lim_{ n \to \infty } \frac{1}{n} = 0$$ . Ngaphezu kwalokho, $$\lim_{ n \to \infty } f(x_n) = \lim_{ n \to \infty } \frac{1}{n} = 0 \neq 42 = f(0)$$ . Ngakho-ke $$f$$ ayisebenzi lapho iphuzu $$x=0$$ isb.

Njengoba isamba nomkhiqizo wemisebenzi eqhubekayo kuqhubeka futhi ngenxa yezigaba eziboshwe ngamaketanga, umuntu angenza kuphela imisebenzi eqhubekayo (isb.ngakaze i- $$f$$ ) ngosizo lwemisebenzi eyisisekelo yezibalo.

Kodwa-ke, uma sivumela ukusebenza kwe- signum engasebenzi , ngokwesibonelo, singakuthola kalula ukubhalwa okunjalo. Ngemuva kwalokho okungukuthi

$$f: \mathbb{R} \to \mathbb{R}, f(x) = sgn^2(x-42)+42.$$

Ngomsebenzi ojwayelekile $$f$$ umahluko wecala uyasebenza

$$f,g,h,a: \mathbb{R} \to \mathbb{R}, f(x) = \begin{Bmatrix} g(x), & \text{falls } a(x) = 0 \\ h(x), & \text{falls } a(x) \neq 0 \end{Bmatrix} = sgn^2 \left(a(x)\right)\cdot h(x) + \left(1-sgn^2\left(a(x)\right)\right)\cdot g(x).$$

Ngakolunye uhlangothi, uma ubheka imisebenzi ngezilimi zohlelo, amagatsha angaxazululwa. Isibonelo, ku-PHP umsebenzi wesiginali ungenziwa imephu nge:

$$f$$ nayo ingakhonjiswa ngaphandle kwanoma yiziphi if / else control structures with: