ChatGPT for Programming Numerical Methods

03/21/2023
by   Ali Kashefi, et al.
0

ChatGPT is a large language model recently released by the OpenAI company. In this technical report, we explore for the first time the capability of ChatGPT for programming numerical algorithms. Specifically, we examine the capability of GhatGPT for generating codes for numerical algorithms in different programming languages, for debugging and improving written codes by users, for completing missed parts of numerical codes, rewriting available codes in other programming languages, and for parallelizing serial codes. Additionally, we assess if ChatGPT can recognize if given codes are written by humans or machines. To reach this goal, we consider a variety of mathematical problems such as the Poisson equation, the diffusion equation, the incompressible Navier-Stokes equations, compressible inviscid flow, eigenvalue problems, solving linear systems of equations, storing sparse matrices, etc. Furthermore, we exemplify scientific machine learning such as physics-informed neural networks and convolutional neural networks with applications to computational physics. Through these examples, we investigate the successes, failures, and challenges of ChatGPT. Examples of failures are producing singular matrices, operations on arrays with incompatible sizes, programming interruption for relatively long codes, etc. Our outcomes suggest that ChatGPT can successfully program numerical algorithms in different programming languages, but certain limitations and challenges exist that require further improvement of this machine learning model.

READ FULL TEXT

page 8

page 12

page 18

page 20

page 23

page 31

page 34

page 39

research
08/08/2023

A Comparative Study of Code Generation using ChatGPT 3.5 across 10 Programming Languages

Large Language Models (LLMs) are advanced Artificial Intelligence (AI) s...
research
05/20/2021

Physics-informed neural networks (PINNs) for fluid mechanics: A review

Despite the significant progress over the last 50 years in simulating fl...
research
04/18/2023

M-ENIAC: A machine learning recreation of the first successful numerical weather forecasts

In 1950 the first successful numerical weather forecast was obtained by ...
research
04/09/2023

Dependently Typing R Vectors, Arrays, and Matrices

The R programming language is widely used in large-scale data analyses. ...
research
05/03/2019

Learning in Modal Space: Solving Time-Dependent Stochastic PDEs Using Physics-Informed Neural Networks

One of the open problems in scientific computing is the long-time integr...
research
05/31/2023

PERFOGRAPH: A Numerical Aware Program Graph Representation for Performance Optimization and Program Analysis

The remarkable growth and significant success of machine learning have e...

Please sign up or login with your details

Forgot password? Click here to reset