From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [kvm-unit-tests PATCH] powerpc: Add tests for RTAS Date: Thu, 3 Mar 2016 13:45:25 +0100 Message-ID: <56D831E5.2030604@redhat.com> References: <1457008099-29944-1-git-send-email-lvivier@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: drjones@redhat.com, thuth@redhat.com, dgibson@redhat.com To: Laurent Vivier , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:40854 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751420AbcCCMpd (ORCPT ); Thu, 3 Mar 2016 07:45:33 -0500 In-Reply-To: <1457008099-29944-1-git-send-email-lvivier@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/03/2016 13:28, Laurent Vivier wrote: > + > +#define DAYS(y,m,d) (365UL * (y) + ((y) / 4) - ((y) / 100) + ((y) / 400) + \ > + 367UL * (m) / 12 + \ Out of curiosity, where did you take this from? I knew the variant with 2447/80 instead of 367/12, but they give the same result, as checked with bc: $ bc for (n=1;n<=12;n++)2447*n/80-367*n/12; 0 0 0 0 0 0 0 0 0 0 0 0 Paolo > + (d)) > +