]> Examples

Examples

  1. You are asked to define a function that computes this error approximation formula. e(x)=1 1 (1+0.278393x+0.230389 x 2 +0.000972 x 3 +0.078108 x 4 ) 4 MathType@MTEF@5@5@+=feaafiart1ev1aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbba9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiaadwgacaGGOaGaamiEaiaacMcacqGH9aqpcaaIXaGaeyOeI0YaaSaaaeaacaaIXaaabaGaaiikaiaaigdacqGHRaWkcaaIWaGaaiOlaiaaikdacaaI3aGaaGioaiaaiodacaaI5aGaaG4maiaadIhacqGHRaWkcaaIWaGaaiOlaiaaikdacaaIZaGaaGimaiaaiodacaaI4aGaaGyoaiaadIhadaahaaWcbeqaaiaaikdaaaGccqGHRaWkcaaIWaGaaiOlaiaaicdacaaIWaGaaGimaiaaiMdacaaI3aGaaGOmaiaadIhadaahaaWcbeqaaiaaiodaaaGccqGHRaWkcaaIWaGaaiOlaiaaicdacaaI3aGaaGioaiaaigdacaaIWaGaaGioaiaadIhadaahaaWcbeqaaiaaisdaaaGccaGGPaWaaWbaaSqabeaacaaI0aaaaaaaaaa@6175@

    Valid names for the function are e, E, formula, computation, value, my_function, fun, etc. But, none of these are good names for this function. It is important to choose a name that is descriptive and will help you remember what the function does. Thus, a better names for this function would be errorApproximationFunction, errorApproximation, error_approximation, Error_Approximation or even just errApprox.

    Consistent capitalization is also necessary to make it easier to remember how to call your functions.