Skip to content

function minimizer issue #8

@rvignolo

Description

@rvignolo

Check out this mwe:

x0 = 0.15
f(x) := sin(2 * pi * 1 * (x - x0))

# PRINT_FUNCTION f MIN 0.5 MAX 1.0 STEP 0.01 FORMAT %e
PRINT func_min(f(x),x,0.5,1.0)
PRINT func_min(f(x),x,0.5,1.0,1e-10)
PRINT func_min(f(x),x,0.5,1.0,1e-10,0)
PRINT func_min(f(x),x,0.5,1.0,1e-10,1)
PRINT func_min(f(x),x,0.5,1.0,1e-10,2)
PRINT func_min(f(x),x,0.5,1.0,1e-10,0,0)
PRINT func_min(f(x),x,0.5,1.0,1e-10,0,1)
PRINT func_min(f(x),x,0.5,1.0,1e-10,1,0)
PRINT func_min(f(x),x,0.5,1.0,1e-10,1,1)
PRINT func_min(f(x),x,0.5,1.0,1e-10,2,0)
PRINT func_min(f(x),x,0.5,1.0,1e-10,2,1)

The correct value is 0.9. However, we only reach that value when we set nocomplain = 1. What do you think about this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions