In the electricity day-ahead markets (DAMs), market participants place their orders in the form of desired/accepted price levels for the submitted quantities. The market operator evaluates these orders and announces the clearing quantities and market clearing prices (MCPs) within an hour. In this paper, a mathematical model is proposed for the exact solution of clearing electricity DAM with a focus on the current Turkish system. The model is a non-linear programming (NLP) problem that maximizes total social welfare and takes into account all types of orders that are submitted in the Turkish DAM. In order to ensure a feasible solution, the concept of paradoxically accepted/rejected orders is introduced. Two versions of the mathematical model are considered, allowing for one type of paradoxical processing in each version. For the computational experiments, a sample data set of 25 days, representing the conditions in the Turkish DAM, is generated and published on an open library. The model is solved to optimality within the practical time limitation of the market operator in all cases.