# Bound-constrained least squares.Status: Inaccurate/Solved

I want to solve the program;
||Ax-b||2
lb<=x<= ub
When the lb=0 and ub=1, the solutions of the program through cvx is correct.
the output of the cvx as follows:

## Status: Solved Optimal value (cvx_optval): +0.123451 ** However, if the lb=0 and ub=1, the solutions of the program through cvx is incorrect. **the last status of cvx is Inaccurate/Solved the output of the cvx as follows: Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.197869e-17. number of iterations = 19 primal objective value = -1.64523804e-02 dual objective value = -1.64549538e-02 gap := trace(XZ) = 2.56e-06 relative gap = 2.48e-06 actual relative gap = 2.49e-06 rel. primal infeas = 1.02e-07 rel. dual infeas = 2.39e-11 norm(X), norm(y), norm(Z) = 1.0e+00, 1.4e+00, 4.8e+01 norm(A), norm(b), norm© = 7.7e+01, 2.0e+00, 4.9e+01 Total CPU time (secs) = 1.19 CPU time per iteration = 0.06 termination code = -7 DIMACS: 1.0e-07 0.0e+00 3.9e-10 0.0e+00 2.5e-06 2.5e-06

Status: Inaccurate/Solved
Optimal value (cvx_optval): +0.016455

if you know the reason, please tell me!
Thank you very much.

What happens if you try another solver?

If you provide reproducible code, then it’s easier help and make suggestions for improvements.