Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Question on Coq-Interval: i_bisect_diff x vs. i_bisect taylor x 1

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Question on Coq-Interval: i_bisect_diff x vs. i_bisect taylor x 1


Chronological Thread 
  • From: "Soegtrop, Michael" <michael.soegtrop AT intel.com>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: [Coq-Club] Question on Coq-Interval: i_bisect_diff x vs. i_bisect taylor x 1
  • Date: Thu, 17 Jan 2019 09:12:52 +0000
  • Accept-language: de-DE, en-US
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=michael.soegtrop AT intel.com; spf=Pass smtp.mailfrom=michael.soegtrop AT intel.com; spf=None smtp.helo=postmaster AT mga06.intel.com
  • Dlp-product: dlpe-windows
  • Dlp-reaction: no-action
  • Dlp-version: 11.0.400.15
  • Ironport-phdr: 9a23:sYKoehzXd5FL6BPXCy+O+j09IxM/srCxBDY+r6Qd2+4SIJqq85mqBkHD//Il1AaPAd2Lraocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HQbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRHolikJKiI5/m/UhMxxkK1UrwmsqAZjz4PQeoyZKOZycr3bcNgHRWRBRMFRVylZD4+ycoUPCPQOPelEr4nnoFsOtQOyDhSrCuPu1jBIhmX50rM+0+gvDArL2wkgH9MSv3TUttr6KqMSXfquzKnP0zrDYO9W2S366IjQaR0hoPeMXa5ufsrV00UgCwTFjlCJpIHjIjib2OMNs22B4OphU+Kik28nqwdtojexwscgkJTGiZwTx1vZ9it52J44KcC2RUN0e9KoDZVdui6AO4drTM4vQntktSgnxrEepJK2fSYHxI4pyhPRcfCLbYaF7xb5WOqMIjp0mmppdK++ihu260Ss1O3xW8au3FpUtCZIk9nBu3YQ3BLJ8MeHUOFy/kK51DaPyQ/T7uZELFgxlarUMZEt3r89moASsUTFAi/5hkH2gLWKeUUj/+ik8+XnYrP4qZ+AL4J4lw/zP6s0lsCiD+k1PRICU3WV9Om9zrHu81D1TK1PjvIsk6nZtJ7aJd4cpq68GwJV14cj5Aq/Dzi8ztsYmWMLLElCeB2ZgIjpJ0vOIPfgDfqkglSslitryO7CPrH7HprNKX3DnK/7fblh805c1BYzzddH6p1IDbEBOev/VVP1tNzFFRA0KBe0wubiCNVlzIwSQ2OPAqmDMKPTq1CE/OwvI/PfLLMS7Xz2LOFg7Przh1c4n0UcdO+nx9FfPHu/B7FtJ1iTSXvqmNYIV2kQ6FkQVuvv3Re5VjNce2y1R+Z0wzAwCIurCc2LEoWsi7yI0SP9BZpbaXxcDUikEHH0eoHCUPAJPnHBavR9myAJAODyA7Qq0guj4VejmuhXa9HM8yhdjqrNkd185undjxY3rGUmDsKB3mXLRGZxzDpRG20GmZtnqEk48W+tlLBiiqUBR91V+/5NFAw9MMyElrEoO5XJQgvEO+yxZhOmT9GhWG5jS904m4FIYkBhFtHkhRfGjXKn

Dear Coq Users,

Dear Guillaume,

 

first let me thank Guillaume and all other contributors for the great “Interval” library! I am currently working on verification of numerical C code and HW, and this library / tactics do a good part of the hard work in a very pleasant and efficient way.

 

There is one thing I don’t understand, though.: i_bisect_taylor and i_bisect work as expected, but I don’t understand what i_bisect_diff does. I would expect that the results of i_bisect_diff is similar to i_bisect_taylor x 1, since both should take 1st derivative information into account – maybe in a slightly different way. But to my surprise i_bisect_diff gives in all cases I tried the same result as i_bisect, which is far away from i_bisect_taylor x 1. Below is a simple example, which also shows the error bounds I get. Could you please explain this behavior?

 

I have one more question: I guess my Coq skill is slightly rusted: how can I supply the term “t” to the tactic in the below example?

 

Best regards,

 

Michael

 

 

Require Import Reals.

Require Import Interval.Interval_tactic.

 

Open Scope R_scope.

 

Definition f   x :=sin (x).

Definition s1:= 4294967285/2^32.

Definition s3:= -715784163/2^32.

Definition fp3 x :=s1 * x + s3 * x^3.

 

Goal forall x, -1/32 <= x <= 1/32 -> True.

Proof.

  intros.

  pose (f(x)-fp3(x)) as t.

  unfold f,fp3,s1,s3 in t.

 

(* i_bisect_taylor 4th order = 1.77355302815385*10^-11 (sufficiently close to real deviation) *)

 

  Time interval_intro (Rabs (sin x - (4294967285 / 2 ^ 32 * x + -715784163 / 2 ^ 32 * x ^ 3)))

    upper with (i_prec 60, i_depth 5, i_bisect_taylor x 4, i_delay) as Ht4.

 

(* i_bisect_taylor 1st order = 5.713030931057944*10^-8 *)

 

  Time interval_intro (Rabs (sin x - (4294967285 / 2 ^ 32 * x + -715784163 / 2 ^ 32 * x ^ 3)))

    upper with (i_prec 60, i_depth 5, i_bisect_taylor x 1, i_delay) as Ht1.

 

(* i_bisect_diff = 0.003906250007731088 *)

 

  Time interval_intro (Rabs (sin x - (4294967285 / 2 ^ 32 * x + -715784163 / 2 ^ 32 * x ^ 3)))

    upper with (i_prec 60, i_depth 5, i_bisect_diff x, i_delay) as Hbd.

 

(* i_bisect = 0.003906250007731088 *)

 

  Time interval_intro (Rabs (sin x - (4294967285 / 2 ^ 32 * x + -715784163 / 2 ^ 32 * x ^ 3)))

    upper with (i_prec 60, i_depth 5, i_bisect x, i_delay) as Hb.

 

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928




Archive powered by MHonArc 2.6.18.

Top of Page